rapier
rapier copied to clipboard
Cannot set KinematicCharacterController.up to the negative Y axis
In my project I have the origin point located at the top left corn of the window and because of that I'm trying to invert the default up value in the KinematicCharacterController, ie:
let controller = KinematicCharacterController {
up: -Vector::y_axis(),
..Default::default()
};
Or:
let controller = KinematicCharacterController {
up: Unit::new_normalize(vector![0.0, -1.0]),
..Default::default()
};
In both cases I get the following panic when calling move_shape():
thread 'main' panicked at 'The loosening margin must be positive.', /home/mhcerri/.cargo/registry/src/github.com-1ecc6299db9ec823/parry2d-0.13.4/src/boundin\
g_volume/aabb.rs:546:9
If I replace -1.0 with 1.0 in the examples above they don't panic, but then autostep and snap to the ground features don't work properly in my scenario (unless if I make the character to walk on the ceiling :-D).
I'm having the same issue.