create ToMessage() for VmcExtCam

This commit is contained in:
Cassandra de la Cruz-Munoz 2023-08-17 14:13:43 -04:00
parent 8f031a447b
commit 8923bd3f25

View File

@ -90,5 +90,21 @@ namespace godotVmcSharp
Transform = transform; Transform = transform;
Fov = fov; Fov = fov;
} }
public new godotOscSharp.OscMessage ToMessage()
{
var quat = Transform.Basis.GetRotationQuaternion();
return new godotOscSharp.OscMessage(addr, new System.Collections.Generic.List<godotOscSharp.OscArgument>{
new godotOscSharp.OscArgument(Name, 's'),
new godotOscSharp.OscArgument(Transform.Origin.X, 'f'),
new godotOscSharp.OscArgument(Transform.Origin.Y, 'f'),
new godotOscSharp.OscArgument(Transform.Origin.Z, 'f'),
new godotOscSharp.OscArgument(quat.X, 'f'),
new godotOscSharp.OscArgument(quat.Y, 'f'),
new godotOscSharp.OscArgument(quat.Z, 'f'),
new godotOscSharp.OscArgument(quat.W, 'f'),
new godotOscSharp.OscArgument(Fov, 'f')
});
}
} }
} }