-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Improve cylinder gizmo performance #103903
Conversation
I'd say 64 segments is too little for large cylinders that are several units wide or more. I'd make it 128 instead, which should be a reasonable approximation of the actual collision shape even for large cylinders. We could make the number of sides dynamic depending on the size, but a static 128 should perform well enough already. |
Ok, I'll trust your judgement on that. I'll bump it to 128 and for spheres too |
f6f7fc6
to
46428c4
Compare
46428c4
to
8eaab62
Compare
Thanks! |
Same as capsule gizmo but for cylinders.
This time align segment number between rendering and collision to be able to reuse, leading to even greater gain.
Expect even better gain (more than x30) as previously (as I removed one loop in this one), making those gizmos really cheap to create and edit.
Cylinder with 64 segments

Cylinder with 360 segments

I don't really see any difference on my screen, and maybe someone will spot one on some really high res screen, but these are supposed to be cheap debug gizmos, so not having a 4k version should be ok (if not, we can always slightly increase it).