In my current project, raycasting selection works perfectly fine for static meshes. However, when it comes to animated meshes, the ray selection seems to ignore the movement of the mesh and only recognizes the original position of the mesh.
The issue arises with an animated model that can only capture the state of the pose below the initial frame, resulting in a small red dot being created when detecting the model. This is due to the fact that the bones matrices are computed by the CPU, while the new vertex positions are computed by the GPU. As a result, the CPU only has access to the first pose, making RayCasting ineffective for skinned meshes.
I have considered updating the model position when updating the animation or utilizing GPU calculations to obtain the location, but I am unsure of how to proceed. Any suggestions would be greatly appreciated. Thank you.