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

Physics nodes reorganization #48908

Merged

Commits on Jun 4, 2021

  1. KinematicBody split between new CharacterBody and PhysicsBody

    PhysicsBody now has methods move_and_collide/test_move and needed
    properties for these methods: safe margin, locked axes (3D only).
    
    Moved collision_exceptions from StaticBody to PhysicsBody for 3D
    (same as 2D, and conforms to documentation).
    
    RigidBody doesn't have test_motion method anymore, it's now redundant
    with PhysicsBody.test_move.
    pouleyKetchoupp committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    ba13d23 View commit details
    Browse the repository at this point in the history
  2. Properties for move_and_slide and remove move_and_slide_with_snap

    - snap property to replace move_and_slide_with_snap()
    - floor_max_angle, stop_on_slope, infinite_inertia, max_slides,
    up_direction properties to replace arguments from move_and_slide()
    - up direction now defaults to Vector3.UP and Vector2.UP
    pouleyKetchoupp committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    287c390 View commit details
    Browse the repository at this point in the history
  3. More explanatory names for RigidBody modes

    MODE_DYNAMIC instead of MODE_RIGID
    MODE_DYNAMIC_LOCKED instead of MODE_CHARACTER
    
    No more special case for sleeping behavior for MODE_DYNAMIC_LOCKED
    (MODE_CHARACTER was forcing the body not to sleep, which is redundant
    with can_sleep and wasn't done in Bullet).
    pouleyKetchoupp committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    ee4b756 View commit details
    Browse the repository at this point in the history
  4. Support for kinematic_motion in StaticBody

    Does the same thing as simulate motion from RigidBody in Kinematic mode,
    and CharacterBody (previously KinematicBody).
    
    Added support for constant linear/angular velocity with kinematic_motion
    in StaticBody, which moves the body in physics.
    
    Updated documentation for StaticBody and CharacterBody to describe their
    functionalities more accurately.
    pouleyKetchoupp committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    6582255 View commit details
    Browse the repository at this point in the history
  5. Safe margin cleanup

    Safe margin property on CharacterBody only, used as argument in
    move_and_collide.
    
    Removed kinematic_safe_margin in 3D physics server, not really useful
    and now harmonized with 2D.
    pouleyKetchoupp committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    b2bd9f4 View commit details
    Browse the repository at this point in the history
  6. Linear velocity cleanup

    CharacterBody has a linear_velocity property to replace the argument in
    move_and_slide.
    
    StaticBody handles reporting linear/angular velocity correctly when
    kinematic motion is used (in 3D, used in vehicle and navigation).
    pouleyKetchoupp committed Jun 4, 2021
    Configuration menu
    Copy the full SHA
    23abac9 View commit details
    Browse the repository at this point in the history