idanarye / bevy-tnua

A floating character controller for Bevy

Home Page:https://crates.io/crates/bevy-tnua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow toggling Tnua on and off

idanarye opened this issue · comments

We need a new component:

pub struct TnuaToggle(pub bool);

When the boolean is set to false, the character controller will just set the motor to not apply any forces. This will allow the character to be fully controlled by other systems without Tnua interfering. And unlike disabling TnuaSystemSet with a run condition or removing the TnuaMotor (solutions I've suggested for #21) this will not leave leftover ExternalForce for the user to reset.