Some adjustments to gfbanm
This commit is contained in:
parent
58bb38df31
commit
536c5435bc
@ -206,16 +206,6 @@ namespace FirstPlugin
|
|||||||
short value2 = (short)node.RotationY.GetFrameValue(Frame);
|
short value2 = (short)node.RotationY.GetFrameValue(Frame);
|
||||||
short value3 = (short)node.RotationZ.GetFrameValue(Frame);
|
short value3 = (short)node.RotationZ.GetFrameValue(Frame);
|
||||||
|
|
||||||
Console.WriteLine("3ds X bits " + Convert.ToString(14, 2));
|
|
||||||
|
|
||||||
if (b.Text == "Waist") {
|
|
||||||
var quat = EulerToQuat(1.570796f, -1.313579f, 0.03490628f);
|
|
||||||
Console.WriteLine($"quat og {quat.X} {quat.Y} {quat.Z} {quat.W}");
|
|
||||||
Console.WriteLine("group " + b.Text);
|
|
||||||
Console.WriteLine($"packed rot {value1} {value2} {value3}");
|
|
||||||
// Console.WriteLine($"quat rot X {x} Y {y} Z {z} W {w}");
|
|
||||||
}
|
|
||||||
|
|
||||||
b.rot = PackedToQuat(value1, value2, value3);
|
b.rot = PackedToQuat(value1, value2, value3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -275,7 +265,7 @@ namespace FirstPlugin
|
|||||||
fy,
|
fy,
|
||||||
fz };
|
fz };
|
||||||
|
|
||||||
int[] qmap = QUATERNION_SWIZZLES[extra & 0b11];
|
int[] qmap = QUATERNION_SWIZZLES[(int)(extra & 0b11)];
|
||||||
Quaternion q = new Quaternion(quat[qmap[0]], quat[qmap[1]], quat[qmap[2]], quat[qmap[3]]);
|
Quaternion q = new Quaternion(quat[qmap[0]], quat[qmap[1]], quat[qmap[2]], quat[qmap[3]]);
|
||||||
if ((extra >> 2) != 0) q *= -1;
|
if ((extra >> 2) != 0) q *= -1;
|
||||||
|
|
||||||
@ -283,11 +273,6 @@ namespace FirstPlugin
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum RotationFlags : ushort
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Quaternion EulerToQuat(float z, float y, float x)
|
public static Quaternion EulerToQuat(float z, float y, float x)
|
||||||
{
|
{
|
||||||
Quaternion xRotation = Quaternion.FromAxisAngle(Vector3.UnitX, x);
|
Quaternion xRotation = Quaternion.FromAxisAngle(Vector3.UnitX, x);
|
||||||
|
Loading…
Reference in New Issue
Block a user