#TransformAspect: Certain math operations seem to be wrong

1 messages · Page 1 of 1 (latest)

lyric rain
#

When using different transform helpers in TransformAspect we noticed that some seem to be incorrect or confusing:

        public float3 TransformRotationLocalToWorld(float3 rotation)
        {
            return WorldTransform.TransformDirection(rotation);
        }

And other seems to take the wrong parameters and don't do what we would expect.

In this example we would expect that the method takes a quaternion and provides the rotation transformed to the global rotation.

late crow
#

I agree, that looks wrong. It sounds like the helper you're looking for is just math.mul(quaternion, quaternion); I'd probably just reach for that instead of going through TransformAspect.