[Bug]: Rotation of DebugDraw3D.DrawBox() draws a warped/flattened box.
JakeRabinowitz opened this issue · comments
JakeRabinowitz commented
Godot version
v4.2.1.stable.mono.official [b09f793f5]
DebugDraw3D version
1.3.1
On which operating systems the error occurs
Windows
Using which renderers the error occurs
No response
Issue description
Applying rotation to DrawBox3D() results in unexpected deformation/warping of the box.
Video:
DrawBox3DRotationBug.mp4
Steps to reproduce
- Create a new Node3D and attach a new C-Sharp Script to it.
- Mark the script as [Tool] and add the following code:
-
public override void _Process(double delta) { Vector3 size = new Vector3(8, 1, 4); Quaternion rotation = Quaternion.FromEuler(new Vector3(0, 0, 45)); DebugDraw3D.DrawBox(Vector3.Zero, rotation, size, new Color(0x00FF00FF), true); }
You will see that the box is warped and no longer a rectangle.
Expected Result
The box should be rotated and still rectangular, the same way that a BoxMesh would be.
Minimal reproduction project
- Note: You might need to close & reopen the main.tscn for the box to render.
Дмитрий Сальников commented
JakeRabinowitz commented
Yep, that second image is what I expected it to look like!
Ah right, my mistake on the 45 degrees! Thanks for correcting me.
Дмитрий Сальников commented
Дмитрий Сальников commented
Later, binaries for testing will appear here.
JakeRabinowitz commented
Later, binaries for testing will appear here.
Looks like it works! Thanks so much for the quick fix!