jcornaz / heron

[DISCONTINUED] An ergonomic physics API for bevy games
MIT License
292 stars 44 forks source link

KinematicVelocityBased bodies are not having their position updated #145

Closed eric556 closed 3 years ago

eric556 commented 3 years ago

While trying to move a KinematicVelocityBased body using the Velocity component, I noticed that the body wouldn't move. Did some investigation and it looks like the rapier body position was never being updated. Did some digging and found that changing body.set_next_kinematic_position to body.set_position fixed the issue. I'm not sure if this is an entirely valid fix

edgarssilva commented 3 years ago

In the case of KinematicVelocityBased it should be setting the velocity not the position maybe with body.set_linvel or body.set_angvel. I think this could be done by also adding ~the KinematicVelocityBased~ (edit:can_have_velocity) to update_rapier_velocity. I will give this a try.