bevy_xpbd
bevy_xpbd copied to clipboard
Why does my Transform::translation immediately get NaN values?
I've spent hours tried to debug this, but am stuck and need some help. Using bevy_xpbd_2d.
I tried to naïvely (following the documentation) add a RigidBody to an existing SpriteBundle entity. But then the Transform::translation x y values immediately go to NaN and the sprite of course disappears. Actually rotation also becomes Quat(0.0, 0.0, NaN, NaN), I'm confident those are related.
I've tried so many things! Different types of RigidBody (including Static) have the same effect. Removing all gravity, including inserting a GravityScale of 0, same effect. LockedAxes::ALL_LOCKED, same effect. Explicitly adding a Position at 0, same effect. Adding colliders and MassPropertiesBundle, same effect.
I just don't know what could possibly be causing this. Is it applying some velocity or force from something else? Is the sync between Position and Translation going wrong? There are no debug messages at all from bevy_xpbd_2d.