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

Script interface improvements for test body motion #53280

Merged

Conversation

pouleyKetchoupp
Copy link
Contributor

@pouleyKetchoupp pouleyKetchoupp commented Oct 1, 2021

General API and doc improvements for body motion in 2D and 3D physics servers.

List of changes:
-Physics servers test body motion use a class to hold parameters instead of multiple arguments to make it more readable and flexible since there are many options: PhysicsTestMotionParameters
-Improved documentation for PhysicsTestMotionResult and KinematicCollision
-Removed read-only properties in PhysicsTestMotionResult and KinematicCollision (not handled in scripts, so they should be get_ methods only instead)

Copy link
Contributor

@fabriceci fabriceci left a comment

Choose a reason for hiding this comment

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

I tested with my 2D and 3D project, and I don't see any regression. Code seems fine.

What do you think about adding a constructor for MotionParameters to reduce the code?

@pouleyKetchoupp
Copy link
Contributor Author

What do you think about adding a constructor for MotionParemeters to reduce the code?

Yeah, it's a good idea to do that for the most used parameters, I'll add it tomorrow.

-Physics servers test body motion use a class to hold parameters instead
of multiple arguments to make it more readable and flexible since there
are many options
-Improved documentation for test body motion and kinematic collision
-Removed read-only properties for body motion results (not handled in
scripts, so they should be get_ methods only instead)
@pouleyKetchoupp
Copy link
Contributor Author

What do you think about adding a constructor for MotionParameters to reduce the code?

Done!

@akien-mga akien-mga merged commit 5b27027 into godotengine:master Oct 4, 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.

3 participants