[Bug]: DrawCylinder radius results in cylinders that are 2x as wide as they should be.
JakeRabinowitz opened this issue · 2 comments
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
Hi again.
Looks like the radius field in DrawCylinderAb
and DrawCylinder
ends up drawing the cylinder 2x as wide as it should.
This CylinderMesh and the DrawCylinder both have a radius of 0.5, but the debug cylinder is twice as wide.
Also viewed from the top, you can see the debug cylinder has a diameter of 2 even though it's radius should be 0.5:
Steps to reproduce
- Create a Node3D.
- Add Attach a script to it and add the following code:
public override void _Process(double delta)
{
float radius = 0.5f;
float height = 2.0f;
DebugDraw3D.DrawCylinderAb(
Vector3.Up * height / 2,
-(Vector3.Up * height / 2),
radius,
Colors.Green
);
}
You'll see that the radius is 2x what it should be. You can compare to a CylinderMesh or CylinderShape3D.
Minimal reproduction project
N/A
Yes, there were questions about specifying the radius or diameter, and I changed it several times. But as far as I remember, the Transform3D version relies on Radius = 1
.
But it looks like I outplayed myself when I was doing draw_cylinder_ab
😅
(And it seems to me that I didn't even check the size of the _ab
version 🤔)