Age | Commit message (Collapse) | Author |
|
Clean physics direct body state usage in 2D and 3D physics
|
|
Use a C++ callback instead of Callable for synchronizing physics nodes' state with physics servers.
Remove usage of PhysicsDirectBodyState in physics nodes when not
necessary.
Store PhysicsDirectBodyState for bodies individually instead of a
singleton to avoid issues when accessing direct body state for multiple
bodies.
PhysicsDirectBodyState is initialized only when needed, so it doesn't
have to be created when using the physics server directly.
Move PhysicsDirectBodyState2D and PhysicsDirectBodyState3D to separate
cpp files.
|
|
Makes it clearer that it's used for special cases when picking a
collision shape.
|
|
Make separation ray shapes work properly in move_and_slide, wihtout the
specific code in CharacterBody like before.
Now most of the logic is handled inside the physics server. The only
thing that's needed is to use ray shapes only for recovery and ignore
them when performing the motion itself (unless we're snapping or slips
on slope is on).
|
|
Partial revert from previously removing ray shapes completely, added
back as a shape type but without the specific character controller code.
|
|
The new name makes it more obvious that it acts as an infinite plane,
and is consistent with its 3D counterpart (WorldMarginShape3D).
|
|
Infinite inertia:
Not needed anymore, since it's now possible to set one-directional
collision layers in order for characters to ignore rigid bodies, while
rigid bodies still collide with characters.
Ray shapes:
They were introduced as a work around to allow constant speed on slopes,
which is now possible with the new property in CharacterBody instead.
|
|
For the time being we don't support writing a description for those, preferring
having all details in the method's description.
Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
|
|
Fixing by applying the movement in two steps, first the platform
movement, and then the body movement. Plus, add the platform movement
when we are on_wall.
|
|
This is only for GodotPhysics, and adds a 3D counterpart to the 2D
method that was recently added.
|
|
|
|
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).
|
|
This allows fine-tuning of collision iterations for more
accurate collision physics with a performance cost.
|
|
Removed _direct_state_changed bindings
Affects 2D and 3D nodes
Callbacks now use Callable
Tests were changed accordingly
|
|
|
|
And fix various bogus bindings following previous PRs.
|
|
|
|
Refactor physics force and impulse code to use (force, position) order
|
|
|
|
|
|
A few extra renames for classes which were missed in last week's PRs.
|