summaryrefslogtreecommitdiffstats
path: root/tests/test_physics_3d.cpp
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2021-05-19 18:15:07 -0700
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2021-06-04 11:40:36 -0700
commitee4b756a51dd8806335e7e201e274b1e43692bf4 (patch)
tree1a943bc3b2fffd1aa619ceeb5305612822013f67 /tests/test_physics_3d.cpp
parent287c3900fdc2629fecefa10ff1c1aced7466c398 (diff)
downloadredot-engine-ee4b756a51dd8806335e7e201e274b1e43692bf4.tar.gz
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).
Diffstat (limited to 'tests/test_physics_3d.cpp')
-rw-r--r--tests/test_physics_3d.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_physics_3d.cpp b/tests/test_physics_3d.cpp
index 02f1b8175d..4488e4bf64 100644
--- a/tests/test_physics_3d.cpp
+++ b/tests/test_physics_3d.cpp
@@ -362,7 +362,7 @@ public:
RID mesh_instance = vs->instance_create2(capsule_mesh, scenario);
character = ps->body_create();
- ps->body_set_mode(character, PhysicsServer3D::BODY_MODE_CHARACTER);
+ ps->body_set_mode(character, PhysicsServer3D::BODY_MODE_DYNAMIC_LOCKED);
ps->body_set_space(character, space);
//todo add space
ps->body_add_shape(character, capsule_shape);
@@ -388,14 +388,14 @@ public:
t.origin = Vector3(0.0 * i, 3.5 + 1.1 * i, 0.7 + 0.0 * i);
t.basis.rotate(Vector3(0.2, -1, 0), Math_PI / 2 * 0.6);
- create_body(type, PhysicsServer3D::BODY_MODE_RIGID, t);
+ create_body(type, PhysicsServer3D::BODY_MODE_DYNAMIC, t);
}
create_static_plane(Plane(Vector3(0, 1, 0), -1));
}
void test_activate() {
- create_body(PhysicsServer3D::SHAPE_BOX, PhysicsServer3D::BODY_MODE_RIGID, Transform3D(Basis(), Vector3(0, 2, 0)), true);
+ create_body(PhysicsServer3D::SHAPE_BOX, PhysicsServer3D::BODY_MODE_DYNAMIC, Transform3D(Basis(), Vector3(0, 2, 0)), true);
create_static_plane(Plane(Vector3(0, 1, 0), -1));
}