dimforge / rapier.rs

Official website for the Rapier physics engine.
https://rapier.rs
17 stars 48 forks source link

Redundant code in character controller offset example #57

Closed softmoth closed 1 month ago

softmoth commented 1 year ago

docs/user_guides/bevy_plugin/character_controller#character-offset has two copies of the same code, with slightly different comments. Probably a merge gone wrong.

/* Configure the character controller when the collider is created. */
commands.spawn(Collider::ball(0.5))
    .insert(KinematicCharacterController {
        // The character offset is set to 0.01.
        offset: CharacterLength::Absolute(0.01),
        ..default()
    });

commands.spawn(Collider::ball(0.5))
    .insert(KinematicCharacterController {
        // The character offset is set to 0.01 multiplied by the collider’s height.
        offset: CharacterLength::Absolute(0.01),
        ..default()
    });
Vrixyz commented 1 month ago

The second offset is now Relative, thanks !