t3
t3 copied to clipboard
[OrbitCamera] doesn't render after setting radius 0
Please complete the following information):
- OS:
- Version: 3.9.3
This issue looks very similar to #340.
var radius = Radius.GetValue(context) == 0.0f ? .0001f : Radius.GetValue(context);
this logic avoids this div/0 (im guessing this is the underlying issue), still display fine (in the value field), fail to render (a 0-radius, makes no geometrical sense) when it's = 0 (actually = .0001)
But the module still works just fine when we move this value again.
Other solution would be to clamp the radius parameter between a close_to_but_not-0 value and infty, but this might break current setups where radius < 0 .
wdyt ?
I was about to suggest to clamp the Radius minimum value to .0001, then I saw @ylmrx idea and tried it as well. I prefer this idea, because it feels better than being stuck at 0 with the clamp, it allows to go from a positive radius to a negative radius.
I prefer how it works without clamping the radius value.
https://github.com/tooll3/t3/assets/3755089/a4e67c11-8aea-4d5c-8b1a-b1aa7150a045
Look good to me!
Thanks @ylmrx !