Closed mcobzarenco closed 2 years ago
The reason for caching the euler angles is that going from quat -> euler angles -> quat
every frame leads to very unstable results. I pushed a change that will compare the intermediate value to the actual value and if they don't match update the intermediate one, so now external changes should be properly handled.
Can you verify that the fix works by setting
[patch.crates-io]
bevy-inspector-egui = { git = "https://github.com/jakobhellermann/bevy-inspector-egui" }
in your Cargo.toml?
The reason for caching the euler angles is that going from quat -> euler angles -> quat every frame leads to very unstable results.
Very interesting -- fwiw, I just removed the caching yesterday and failed to observe these cases. To clarify, without caching, you wouldn't do the full conversion quat -> euler angles -> quat
every frame
quat -> euler angles
every frame to display the values in the inspectoreuler angles -> quat
only on changes, e.g. if changed
is trueI pushed a change that will compare the intermediate value to the actual value and if they don't match update the intermediate one, so now external changes should be properly handled.
I just tried it locally -- amazing! :100: Thank you so much for the swift fix, much appreciated!
Thanks so much for this great plugin :100:
I noticed that when manipulating
Transform
s manually, the changes to the rotation are not updated (changes toQuat
in general). I tried bothWorldInspectorPlugin
andInspectorPlugin
. Notice the rotation not updatingAbove is small change to
examples/transform.rs
to rotate and translate the cube and setdata.transform
from the cube's transformLooking at the code, from what I can tell, it is likely related to the fact that they are cached, maybe without updating
context.id()
. As long as the value can change outside the inspector, I am not sure what the correct solution is.If it is important to avoid the recalculation (?), keeping track instead whether the raw
Quat
value has changed instead? Apologies if this is not correct -- could the problem be thatcontext.id()
should have changed? Not familiar withegui
and how to useId
.