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

Port 2D improvements to move and slide 3D (with extras) #52889

Merged

Conversation

fabriceci
Copy link
Contributor

@fabriceci fabriceci commented Sep 21, 2021

Thanks to @pouleyKetchoupp for his help/work on this, as this was harder than I thought. The latest "jitters" are definitively the worst :)

fix #30310
fix #50756
fix #51874
fix #52887

Test project: https://github.com/fabriceci/3d-platform-test-for-godot4 (based on the @TokageItLab one, thanks to him)

This PR should provide a good physics by default for CharacterBody3D, without any effort.

  • all the improvement added in 2D to move and slide + new improvement (ability to choice the behaviour when the body left a platform)

Screenshot 2021-09-21 at 10 18 57

  • the ability to detect multiple collisions on move_and_collide which allows us to handle advanced cases like the one below in the screenshot when the body is stuck between two walls

Screenshot 2021-09-21 at 00 13 40

  • new methods to retrieve important information (latest motion, true velocity, etc.)
  • tweak value/code to behave nicely by default: minimal floor snap, default floor snap, etc.

@fabriceci fabriceci added this to the 4.0 milestone Sep 21, 2021
@fabriceci fabriceci requested review from a team as code owners September 21, 2021 09:10
@fabriceci fabriceci removed request for a team September 21, 2021 09:11
@YuriSizov YuriSizov requested a review from a team September 21, 2021 09:33
Copy link
Contributor

@pouleyKetchoupp pouleyKetchoupp left a comment

Choose a reason for hiding this comment

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

Great work! I've left some comments about details but it generally looks good.

Edit: Also needs a rebase because of recent changes in the documentation.

doc/classes/CharacterBody3D.xml Outdated Show resolved Hide resolved
doc/classes/CharacterBody3D.xml Outdated Show resolved Hide resolved
doc/classes/CharacterBody3D.xml Outdated Show resolved Hide resolved
scene/3d/physics_body_3d.cpp Outdated Show resolved Hide resolved
scene/3d/physics_body_3d.cpp Outdated Show resolved Hide resolved
scene/3d/physics_body_3d.cpp Outdated Show resolved Hide resolved
scene/3d/physics_body_3d.cpp Outdated Show resolved Hide resolved
Co-authored-by: Camille Mohr-Daurat <pouleyketchoup@gmail.com>
@fabriceci fabriceci force-pushed the multiple_collision-support-fab branch from 43cf8fa to fd9e573 Compare September 21, 2021 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment