Handle object rotation
This commit is contained in:
parent
85599b4069
commit
0c0394df86
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue