diff options
| author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-06-04 16:09:41 -0700 |
|---|---|---|
| committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-25 08:57:42 -0700 |
| commit | 6a9ed72185a910f803fff91ef1f408ad91884d20 (patch) | |
| tree | c830ce6dca827a29305f2e28c960264ac55b9443 /servers/physics_3d/step_3d_sw.cpp | |
| parent | 353bb45e21fadf8da1f6fbbaaf99b8ac8acafea9 (diff) | |
| download | redot-engine-6a9ed72185a910f803fff91ef1f408ad91884d20.tar.gz | |
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.
Diffstat (limited to 'servers/physics_3d/step_3d_sw.cpp')
| -rw-r--r-- | servers/physics_3d/step_3d_sw.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/physics_3d/step_3d_sw.cpp b/servers/physics_3d/step_3d_sw.cpp index ba18bac611..d0604b0aa0 100644 --- a/servers/physics_3d/step_3d_sw.cpp +++ b/servers/physics_3d/step_3d_sw.cpp @@ -185,6 +185,8 @@ void Step3DSW::step(Space3DSW *p_space, real_t p_delta, int p_iterations) { p_space->setup(); //update inertias, etc + p_space->set_last_step(p_delta); + iterations = p_iterations; delta = p_delta; |
