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

Fix head's position offset in stair stepping by using only y component of the result #345

Merged

Conversation

mrezai
Copy link
Contributor

@mrezai mrezai commented Dec 5, 2024

It seems there is a bug or limitation in Physics Engine when collision shapes change in runtime that cause result of body_test_motion to be unreliable, for example in current implementation of stair stepping we used body_test_motion to check motion only in y axis but in the result, by calling get_reminder or get_travel functions we get values that x and z are non-zero too.
This video shows what happen when bug isn't fixed and after some crouch/auto-uncrouch in window, camera goes through walls because head offset changed in x and z wrongly:

rec3.mp4

…t of the result. It seems there is a bug or limitation in Physics Engine when collision shapes change in runtime.
Copy link
Owner

@Phazorknight Phazorknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes total sense.
Thanks for this!

@Phazorknight Phazorknight merged commit ea50a26 into Phazorknight:main Dec 6, 2024
1 check passed
@mrezai mrezai deleted the fix-stair-stepping-head-offset branch December 6, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants