-
Notifications
You must be signed in to change notification settings - Fork 2
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
Floating point error accumulation when moving slot #3157
Comments
This isn't an issue technically speaking, but I agree that it is a little annoying / frustrating. I usually set the slots local transform back to 0 manually when that happens. |
As you covered, this is likely an expected outcome from a lack of floating point precision- as such- I do not think this should be considered a bug. Seeking input from @Frooxius if there is anything we would want to do to mitigate this. In #121 Frooxius had noted plans to mitigate / minimize issues with floating point imprecision in larger worlds by "chunking" them.
|
What I was trying to say is that the precision error can be avoided by applying the relevant transformations relative to the first shared parent's space rather than the world space, since doing the math on a bunch of identity transforms should not accumulate an error. |
Computations based on the first shared parent will be more precise in general but I assume there may be performance implications if the precomputed local-to-global/global-to-local matrices aren't used. |
Describe the bug?
When moving a slot between parents, a small error accumulates in the transform of the slot, which is especially noticeable for non-visual and UI slots that typically have a default transform. This might be due to the transform being calculated relative to world space, rather than the first common (grand)parent of the two parents.
Due to the nature of the slots' transforms not being relevant in these cases, this is technically a non-issue, but it is still a bother to me and I've noticed myself wanting to reset transforms after moving these slots just so they're at the default value. There is the argument of "if it's not default, then there should be a reason why it isn't", as well as the possibility of some ProtoFlux wanting to test if a slot's transform is default for some reason?
To Reproduce
Expected behavior
If all involved transforms are default, no floating point error should accumulate when moving a slot to a different parent.
Screenshots
Resonite Version Number
2024.10.29.1229
What Platforms does this occur on?
Linux
What headset if any do you use?
No response
Log Files
Not.. relevant?
Additional Context
No response
Reporters
copygirl
The text was updated successfully, but these errors were encountered: