jcornaz / heron

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

API to disable movement for specific entities #254

Open Shatur opened 2 years ago

Shatur commented 2 years ago

In networking when you implementing rollback, you need to tick physics only networking objects and skip simulation for other visual only entities. I would add a component which freezes the entity. Like Visibility in Bevy. If such component present with boolean field is_frozen, then the object won't move, but still collide with other objects.

Naive approach would be lock translation and backup velocity for entities until this component is present. But is this the right way of doing it? Maybe Rapier have something for it?