fix typo in error, create new constructor for VmcExtBonePos

This commit is contained in:
Cassandra de la Cruz-Munoz 2023-08-16 19:12:12 -04:00
parent e405477b79
commit 49a1fa88c9

View File

@ -31,7 +31,7 @@ namespace godotVmcSharp
{ {
if (m.Data.Count != 8) if (m.Data.Count != 8)
{ {
GD.Print($"Invalid number of arguments for {base.addr}. Expected 8 or 14, received {m.Data.Count}."); GD.Print($"Invalid number of arguments for {addr}. Expected 8, received {m.Data.Count}.");
return; return;
} }
if (m.Data[0].Type != 's') if (m.Data[0].Type != 's')
@ -77,5 +77,11 @@ namespace godotVmcSharp
name = (string)m.Data[0].Value; name = (string)m.Data[0].Value;
transform = new Godot.Transform3D(new Godot.Basis(new Godot.Quaternion((float)m.Data[4].Value, (float)m.Data[5].Value, (float)m.Data[6].Value, (float)m.Data[7].Value)), new Godot.Vector3((float)m.Data[1].Value, (float)m.Data[2].Value, (float)m.Data[3].Value)); transform = new Godot.Transform3D(new Godot.Basis(new Godot.Quaternion((float)m.Data[4].Value, (float)m.Data[5].Value, (float)m.Data[6].Value, (float)m.Data[7].Value)), new Godot.Vector3((float)m.Data[1].Value, (float)m.Data[2].Value, (float)m.Data[3].Value));
} }
public VmcExtBonePos(string _name, Godot.Transform3D _transform) : base(new godotOscSharp.Address("/VMC/Ext/Bone/Pos"))
{
name = _name;
transform = _transform;
}
} }
} }