DzQuat question
BradCarsten
Posts: 856
I have the following 2 scripts that find a node (merlins skull) and rotates it 90 degrees. the second uses an overloaded version of DzQuad
var nNode=Scene.findNode('MRLN_MSSkull_7542');nNode.setLocalRot(DzQuat(0,1,0,Math.PI/2);
var nNode=Scene.findNode('MRLN_MSSkull_7542');nNode.setLocalRot(DzQuat( DzVec3(0,1,0),(Math.PI/2)));
As you can see from the attached image, they give different results.
image one is starting position, two is script 1 and three is script 2. (script 2 is how I would expect it to behave.)
Post edited by BradCarsten on
Comments
Movement is contrained by ERC or riggin, disable YRotation(Twist control) limits for that node.
it seems to be doing it even with a primitive cube- with no limits or rigging.
I tested it and you are right, I think you've found a bug, now you can go reclaim your CS report number.
Submitted
The first constructor you use with four values directly sets the 4 values of the quaterion directly (equivalent to setter "setValue(x,y,z,w)").
The second constructor is creating a quaterion by converting an axis and angle pair to a quaterion (equivalent to the setter "setValue(DzVec3 axis, double radians)").
They should almost always yeild a different results from each other, when given the same numbers.
Thanks for getting back to us on this.