Question

I've got two nodes, and I know the rotation of only one of them.

I want to apply the rotation of node 1 to node 2, but with one axis zeroed out (in Euler terms).

How?

Was it helpful?

Solution

Never mind, I figured it out.

e.g. For x axis:

double xRot = -(myQuat.ToEuler().x)
Quat qDiff = Quat(sin(xRot / 2.0), 0, 0, cos(xRot / 2.0)).Normalize()
Quat myQuatZeroX = myQuat * qDiff
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top