Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSGPolygon3D - Certain numbers of Spin Sides always result in empty shape #100817

Open
novemberist opened this issue Dec 26, 2024 · 3 comments · May be fixed by #100826
Open

CSGPolygon3D - Certain numbers of Spin Sides always result in empty shape #100817

novemberist opened this issue Dec 26, 2024 · 3 comments · May be fixed by #100826

Comments

@novemberist
Copy link

novemberist commented Dec 26, 2024

Tested versions

  • reproducible in Godot v4.4.dev (0f95e9f)

System information

Arch Linux 20240101.0.204074 on Wayland - Wayland display driver, Single-window, 2 monitors - Vulkan (Forward+) - dedicated Intel(R) Graphics (BMG G21) - AMD Ryzen 7 5700X3D 8-Core Processor (16 threads)

Issue description

When using Spin Mode with CSGPolygon3D, certain numbers of Spin Sides (6,7,11,13,14,16,18,20 etc.) always result in an empty shape when using 360° Spin:

Image

You can use a lower value for Spin Degrees (like 359.9) but this is not ideal:

Image

Steps to reproduce

  • create a CSGPolygon3D
  • switch Mode to "Spin", and keep Spin Degrees at 360
  • change Spin Sides to a value like 6,7,11,13,14,16,18,20 ...

Minimal reproduction project (MRP)

see steps to reproduce

@fire
Copy link
Member

fire commented Dec 26, 2024

Does 0 degrees also fail? If it doesn't, then changing the limit from 0 to 359.999999 would solve this without too much breakage.

@Lielay9
Copy link
Contributor

Lielay9 commented Dec 26, 2024

@fire Sounds similar to #100020, I may have missed one.

Edit1: Welp that was fast.

current_xform.rotate(Vector3(0, 1, 0), spin_step);

Not exactly the same as this isn't due to the trig functions per se, but the first and last iterations vertices don't align. I'll have fix for that in couple minutes.

@novemberist
Copy link
Author

novemberist commented Dec 26, 2024

Does 0 degrees also fail? If it doesn't, then changing the limit from 0 to 359.999999 would solve this without too much breakage.

The editor only allows values between 1.0 und 360.0 for degrees (and also only one decimal place), so I cannot test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants