[1,0,0,0]
[0,0,1,0]
[0,1,0,0]
[0,0,0,1]
و لم ينجح ما المشكلة بالتحديد ؟!
for i=1 to bcount do
(
format ((skinOps.GetBoneName skn i 0) +"\n")to:str;
_bbb = getNodeByName((skinOps.GetBoneName skn i 0));
format ("Children[" + (_bbb.Children.Count as string)+"]{")to:str;
for ii in _bbb.Children do
(
format (ii.Name + ",")to:str;
)
format ("}\n")to:str;
)
eu = (quatToEuler Rotation order:1);
q = (eulerToQuat eu order:2);
-- order:
--1 : XYZ
--2 : XZY
for obj in selection do
(
local q = obj.rotation
// read the old axis and angle
local axis = q.axis
local angle = q.angle
// convert the axis as a normal vector conversion
// or as a normal Point3 conversion
// this conversion depend on your engine coordinate system
// (right hand or left hand)
local newAxis = [axis.x, axis.z, -axis.y]
// calculate the new rotation from the new axis and the old angle
local newRotation = quat angle newAxis
// now you can save the new rotation here ...
)