Fix off-by-one on rotation

This commit is contained in:
Jarrod Doyle 2024-09-07 12:12:28 +01:00
parent a08fd190f8
commit dd2fd3f37b
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ public partial class Mission : Node3D
var modelName = modelNameProp.value + ".bin"; var modelName = modelNameProp.value + ".bin";
var pos = brush.position.ToGodotVec3(); var pos = brush.position.ToGodotVec3();
var rawRot = brush.angle; var rawRot = brush.angle;
var rot = new Vector3(rawRot.Y, rawRot.Z, rawRot.X) * 360 / ushort.MaxValue; var rot = new Vector3(rawRot.Y, rawRot.Z, rawRot.X) * 360 / (ushort.MaxValue + 1);
var scale = scaleProp == null ? Vector3.One : scaleProp.value.ToGodotVec3(false); var scale = scaleProp == null ? Vector3.One : scaleProp.value.ToGodotVec3(false);
var model = Timing.TimeStage("Get Models", () => var model = Timing.TimeStage("Get Models", () =>
{ {