Handle object rotation

This commit is contained in:
Jarrod Doyle 2024-08-25 11:21:00 +01:00
parent 85599b4069
commit 0c0394df86
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 7 additions and 9 deletions

View File

@ -218,20 +218,18 @@ public partial class Mission : Node3D
objPath ??= _installPaths.GetObjectPath(modelName + ".bin");
var pos = brush.position.ToGodotVec3();
var model = new Model();
model.Position = pos;
var rawRot = brush.angle;
var rot = new Vector3(rawRot.Y, rawRot.Z, rawRot.X) * 360 / ushort.MaxValue;
var model = new Model
{
Position = pos,
RotationDegrees = rot
};
if (objPath != null)
{
model.BuildModel("", objPath);
}
AddChild(model);
// var pos = brush.position.ToGodotVec3();
// var cube = new CsgBox3D
// {
// Position = pos
// };
// AddChild(cube);
}
}