Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KinematicCharacterController doesn't respect max_slope_climb_angle #534

Open
emiosproj opened this issue Jun 18, 2024 · 1 comment
Open
Labels
A-Dynamics A-Integration very bevy specific C-Bug Something isn't working D-Medium P-High arbitrary important item

Comments

@emiosproj
Copy link

emiosproj commented Jun 18, 2024

How to reproduce:
Set max_slope_climb_angle.
Translate the controller with no Up force into a slope that is of greater angle than max_slope_climb_angle.

Expected:
If the slope is a higher angle than max_slope_climb_angle we stop like its a wall
Actual:
KinematicCharacterController translates us up the slope.

Here is the sample code that can be used to demonstrate this behavior:
#532

@Vrixyz Vrixyz added C-Bug Something isn't working D-Medium P-High arbitrary important item A-Dynamics A-Integration very bevy specific labels Jun 18, 2024
@Vrixyz
Copy link
Contributor

Vrixyz commented Jun 18, 2024

Some important information: the character controller from rapier reacts correctly to a slope they cannot climb.
^ That means the bug is either within bevy_rapier or on its example.

Wild guesses, it might or might not be what's happening, but it could help to verify that theory:

it might be related to system ordering and transform propagation:

  • bevy user sets the desired transform for the kinematic controller
  • bevy_rapier reads that desired transform, infers the desired movement and runs the character_solve_collision etc
  • bevy user reads the kinematic controller output and player input, and sets that to the desired transform
  • ⚠️ bevy_rapier detects the globalTransform has changed, and updates the internal rigidbody

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Dynamics A-Integration very bevy specific C-Bug Something isn't working D-Medium P-High arbitrary important item
Projects
None yet
Development

No branches or pull requests

2 participants