summaryrefslogtreecommitdiffstats
path: root/servers/physics_2d/godot_step_2d.cpp
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2021-12-03 10:38:40 -0700
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2021-12-03 12:01:38 -0700
commit2273a78af1034b23b6bdefd993c41a27b4847d4b (patch)
tree015bf9aed485ce733aea0cb6f98c100970f5082f /servers/physics_2d/godot_step_2d.cpp
parent5cbc7149a1cd9a55ffccf8ca96e48b872417ce89 (diff)
downloadredot-engine-2273a78af1034b23b6bdefd993c41a27b4847d4b.tar.gz
Update space parameters in 2D and 3D
Clarified space parameters for contacts and added missing ones. List of changes: -Add contact bias to space parameters -Add solver iterations to space parameters, instead of a specific physics server function -Renamed BODY_MAX_ALLOWED_PENETRATION to CONTACT_MAX_ALLOWED_PENETRATION to make it consistent with other contact parameters
Diffstat (limited to 'servers/physics_2d/godot_step_2d.cpp')
-rw-r--r--servers/physics_2d/godot_step_2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_2d/godot_step_2d.cpp b/servers/physics_2d/godot_step_2d.cpp
index 00d11acdab..bc604e380a 100644
--- a/servers/physics_2d/godot_step_2d.cpp
+++ b/servers/physics_2d/godot_step_2d.cpp
@@ -124,14 +124,14 @@ void GodotStep2D::_check_suspend(LocalVector<GodotBody2D *> &p_body_island) cons
}
}
-void GodotStep2D::step(GodotSpace2D *p_space, real_t p_delta, int p_iterations) {
+void GodotStep2D::step(GodotSpace2D *p_space, real_t p_delta) {
p_space->lock(); // can't access space during this
p_space->setup(); //update inertias, etc
p_space->set_last_step(p_delta);
- iterations = p_iterations;
+ iterations = p_space->get_solver_iterations();
delta = p_delta;
const SelfList<GodotBody2D>::List *body_list = &p_space->get_active_body_list();