Set bone rotations for Poseable mesh in local space
Greetings to everyone. : )
I'm implementing a VR experience on UE4 that detects the movement of the VR experience user, updating the user or representation of the user inside the virtual world.
For doing so, I've implemented this behavior with C++ based on what 'Michael Noland' says in this topic: https://forums.unrealengine.com/showthread.php?25264-Pose-a-skeletal-mesh-in-runtime
That is, I have an USkeletalMeshComponent (whose Skeletal mesh is the one seen on screen), and an UPoseableMeshComponent (being set as the "master pose component" for the USkeletalMeshComponent), that receives the rotation data as quaternions from each tracking sensor.
One hand, the mesh for the UPoseableMeshComponent will be set to the mesh of the USkeletalMeshComponet. The other hand, the bones of the poseable mesh are updated with the corresponding rotation data coming from the tracking sensors for each bone, which makes automatically the skeletal mesh to be updated accordingly due to the UPoseableMeshComponent was set as "master pose component" for the USkeletalMeshComponent.
This works pefectly when working with all the body parts that are not finger phalanxes, because rotations are set on those body parts in world space, in this way:
However, for technical reasons, it is mandatory to set the bone rotations for each finger phalanx in LOCAL space, but poseable meshes seems to work only on world space and component space; checking out 'SkinnedMeshComponent.h' there is a 'LocalSpace' enum value on EBoneSpaces::Type... but it's commented!.
I cannot understand the phrase 'Set position of bone in components reference frame'. It doesn't seem to work as the "replacement" for local space (with this option it behaves as if the bone were rotating around the avatar's pivot point). Is there any other way to set rotations in local space for a poseable mesh?.
Thanks in advance. : )
Follow this question
Once you sign in you will be able to subscribe for any updates here