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

API improvement on the physics (CharacterBody and related classes) #51645

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

fabriceci
Copy link
Contributor

@fabriceci fabriceci commented Aug 13, 2021

This PR makes changes in the API according chat's discussions and aims to steer the API to his final form for 4.0 alpha.

Changes:

  • Rename few methods/property and group them in the editor when it's possible
  • Improvement on the CharacterBody docs.
  • Make MotionResult internal API consistency with KinematicCollision
  • Return a boolean in move_and_slide if there was a collision
  • New methods:
    • get_floor_angle on CharacterBody to get the floor angle.
    • get_angle on KinematicCollision to get the collision angle.
    • get_last_slide_collision to quickly get the latest collision of move_and_slide.

@fabriceci fabriceci requested review from a team as code owners August 13, 2021 21:08
@Calinou Calinou added this to the 4.0 milestone Aug 13, 2021
@Calinou Calinou added enhancement and removed bug labels Aug 13, 2021
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.

Looks great! I've just left a few suggestions for the documentation.

Changes:

- Rename few methods/property and group them in the editor when it's possible
- Make MotionResult API consistency with KinematicCollision
- Return a boolean in move_and_slide if there was a collision
- New methods:
  - get_floor_angle on CharacterBody to get the floor angle.
  - get_angle on KinematicCollision to get the collision angle.
  - get_last_slide_collision to quickly get the latest collision of move_and_slide.
@fabriceci fabriceci force-pushed the improve-physics-api branch from 018c819 to d776b6c Compare August 15, 2021 10:53
@akien-mga akien-mga changed the title API improvement on the physics (CharacterBody and related classe) API improvement on the physics (CharacterBody and related classes) Aug 16, 2021
@akien-mga akien-mga merged commit 4344022 into godotengine:master Aug 16, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants