bevy_rapier icon indicating copy to clipboard operation
bevy_rapier copied to clipboard

Fix spawn position of colliders without rigid bodies

Open james-j-obrien opened this issue 1 year ago • 0 comments

Attempt to fix #249.

Issue occurs when a collider has no parents and is not being attached to a rigid body. Since the entity has no parent it will not get it's own transform from the parent query. With these changes if a collider is not being attached to a handle we instead use the global transform to position it. Based on the documentation for ColliderBuilder.position and testing this seems correct.

Fixes the bug as it appears in #249 and as I encountered it in my personal project.

james-j-obrien avatar Aug 24 '22 19:08 james-j-obrien