Read rotation, Local vs World


👉 BlitzCoder will be building a new platform and other plans to preserve and continue the Blitz legacy.

To be able to achieve this goal, we need your support by becoming a Patreon Paid Member 👈

 

Tweet
MuddyWaters

I have an animated b3d file exported from max (that was attached to a biped with a .bvh motion capture)
I've been trying to convert the joint rotations from global to local and regardless of how I read the values during playback (True or False), when I try to apply these YPR values to another unanimated character (same one, uncontaminated, without animation) the joints only rotate correctly if I specify GLOBAL.
In short-
How can I read the local rotation instead of the world rotation if they both return the same thing?

MuddyWaters commented:

I suppose part of it could be that all the parents might be at 0 rotation. My arm animation only affects 4 joints. Another part is that my arms are straight out at 0 degrees roll. The bipeds were at the side at 0.
I hope someone can help. I'm really not sure what to do.

BlitzCoder commented:

Hey Muddy, it would be nice if you can upload a sample 3d model or part of the code in question so others can understand it better.

..and Welcome aboard

RemiD commented:

for bones or pivots you only need to use entitypitch(bone,true), entityyaw(bone,true), entityroll(bone,true) (take a look at the documentation for the necessity to set the parameter to false or true, default is false)

for skinnedvertices or vertices of a scaled, rotated, positioned mesh, you need to use tformpoint(vertexX,vertexY,vertexZ,entity,0) (transforms the position of vertex from entity space to world space)

Reply To Topic (minimum 10 characters)

Please log in to reply