Raycaster intersection with morphTarget

Please have a look at the following thread: Object bounds not updated with animation

I’ve posted there two fiddles that demonstrate how to apply the vertex transformation of skeletal animation in JavaScript.

In general, it is no good approach to compute this vertex transformation each frame since it’s computationally very expensive. You might want to use the following fiddle which computes the maximum bounding box that contains the SkinnedMesh the entire animation. You can then raycast against the AABB each frame which is a very fast operation.

https://jsfiddle.net/v02kLhsm/2/

1 Like