mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-14 00:47:37 +00:00
Some adjustments to gfbanm
This commit is contained in:
parent
58bb38df31
commit
536c5435bc
1 changed files with 1 additions and 16 deletions
|
@ -206,16 +206,6 @@ namespace FirstPlugin
|
|||
short value2 = (short)node.RotationY.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);
|
||||
}
|
||||
else
|
||||
|
@ -275,7 +265,7 @@ namespace FirstPlugin
|
|||
fy,
|
||||
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]]);
|
||||
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)
|
||||
{
|
||||
Quaternion xRotation = Quaternion.FromAxisAngle(Vector3.UnitX, x);
|
||||
|
|
Loading…
Reference in a new issue