summaryrefslogtreecommitdiff
path: root/servers/physics_2d/physics_server_2d_sw.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2021-08-31 14:30:17 -0300
committerGitHub <noreply@github.com>2021-08-31 14:30:17 -0300
commit794606657745e77b89523f19c5e3b69c838f0cb7 (patch)
tree35126d4c7cf99e3c5e4b4bea2734682f96ee3a2c /servers/physics_2d/physics_server_2d_sw.h
parent0ee1179c1cce87c77efe70cd78399525444d587b (diff)
parent6a9ed72185a910f803fff91ef1f408ad91884d20 (diff)
Merge pull request #49471 from nekomatata/body-state-sync-callback
Clean physics direct body state usage in 2D and 3D physics
Diffstat (limited to 'servers/physics_2d/physics_server_2d_sw.h')
-rw-r--r--servers/physics_2d/physics_server_2d_sw.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/servers/physics_2d/physics_server_2d_sw.h b/servers/physics_2d/physics_server_2d_sw.h
index c5b6d550d7..ef1306cf59 100644
--- a/servers/physics_2d/physics_server_2d_sw.h
+++ b/servers/physics_2d/physics_server_2d_sw.h
@@ -46,7 +46,6 @@ class PhysicsServer2DSW : public PhysicsServer2D {
bool active;
int iterations;
bool doing_sync;
- real_t last_step;
int island_count;
int active_objects;
@@ -59,8 +58,6 @@ class PhysicsServer2DSW : public PhysicsServer2D {
Step2DSW *stepper;
Set<const Space2DSW *> active_spaces;
- PhysicsDirectBodyState2DSW *direct_state;
-
mutable RID_PtrOwner<Shape2DSW, true> shape_owner;
mutable RID_PtrOwner<Space2DSW, true> space_owner;
mutable RID_PtrOwner<Area2DSW, true> area_owner;
@@ -242,7 +239,9 @@ public:
virtual void body_set_max_contacts_reported(RID p_body, int p_contacts) override;
virtual int body_get_max_contacts_reported(RID p_body) const override;
+ virtual void body_set_state_sync_callback(RID p_body, void *p_instance, BodyStateCallback p_callback) override;
virtual void body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata = Variant()) override;
+
virtual bool body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) override;
virtual void body_set_pickable(RID p_body, bool p_pickable) override;