Door collider #376
Replies: 3 comments
-
There is a |
Beta Was this translation helpful? Give feedback.
-
Seems like ColiderDisabled does not work fully for me. Disabling works: commands.entity(door_event.entity()).insert(ColliderDisabled); But there is no way of re-enabling it. The removing component does not do the trick: commands.entity(door_event.entity()).remove::<ColliderDisabled>(); However, this just removes the component and event that is supposed to re-enable the collider does the following: for (handle, _) in changed_disabled.iter() {
if let Some(co) = context.bodies.get_mut(handle.0) {
co.set_enabled(false);
}
} The code snippet is from Still, the door is walkthroughable. |
Beta Was this translation helpful? Give feedback.
-
My |
Beta Was this translation helpful? Give feedback.
-
Inserting and removing the collider component could be an option, but I am interested in finding a way to mutate and disable the collider to allow other objects to pass through and then re-enable it again.
Beta Was this translation helpful? Give feedback.
All reactions