diff options
author | rafallus <rafaelmtzg@gmail.com> | 2021-03-30 00:22:23 -0600 |
---|---|---|
committer | rafallus <rafaelmtzg@gmail.com> | 2021-04-22 23:20:58 -0500 |
commit | cfa06f0f76c7ab5f77d5f3bb876132e3aa2cac5e (patch) | |
tree | e5ef2585bcb30f22773b16e92359ea3fcad7f465 /tests/test_physics_3d.cpp | |
parent | 6cfbf3633883f2bd1088f050b8a5d9e0db622e90 (diff) |
Unexpose _direct_state_changed in PhysicsBody
Removed _direct_state_changed bindings
Affects 2D and 3D nodes
Callbacks now use Callable
Tests were changed accordingly
Diffstat (limited to 'tests/test_physics_3d.cpp')
-rw-r--r-- | tests/test_physics_3d.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/test_physics_3d.cpp b/tests/test_physics_3d.cpp index bb324d8ffe..ac8078a0a8 100644 --- a/tests/test_physics_3d.cpp +++ b/tests/test_physics_3d.cpp @@ -77,10 +77,6 @@ class TestPhysics3DMainLoop : public MainLoop { bool quit; protected: - static void _bind_methods() { - ClassDB::bind_method("body_changed_transform", &TestPhysics3DMainLoop::body_changed_transform); - } - RID create_body(PhysicsServer3D::ShapeType p_shape, PhysicsServer3D::BodyMode p_body, const Transform p_location, bool p_active_default = true, const Transform &p_shape_xform = Transform()) { RenderingServer *vs = RenderingServer::get_singleton(); PhysicsServer3D *ps = PhysicsServer3D::get_singleton(); @@ -93,7 +89,7 @@ protected: ps->body_set_param(body, PhysicsServer3D::BODY_PARAM_BOUNCE, 0.0); //todo set space ps->body_add_shape(body, type_shape_map[p_shape]); - ps->body_set_force_integration_callback(body, this, "body_changed_transform", mesh_instance); + ps->body_set_force_integration_callback(body, callable_mp(this, &TestPhysics3DMainLoop::body_changed_transform), mesh_instance); ps->body_set_state(body, PhysicsServer3D::BODY_STATE_TRANSFORM, p_location); bodies.push_back(body); @@ -370,8 +366,7 @@ public: ps->body_set_space(character, space); //todo add space ps->body_add_shape(character, capsule_shape); - - ps->body_set_force_integration_callback(character, this, "body_changed_transform", mesh_instance); + ps->body_set_force_integration_callback(character, callable_mp(this, &TestPhysics3DMainLoop::body_changed_transform), mesh_instance); ps->body_set_state(character, PhysicsServer3D::BODY_STATE_TRANSFORM, Transform(Basis(), Vector3(-2, 5, -2))); bodies.push_back(character); |