diff options
author | Juan Linietsky <reduzio@gmail.com> | 2021-08-31 14:30:17 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-31 14:30:17 -0300 |
commit | 794606657745e77b89523f19c5e3b69c838f0cb7 (patch) | |
tree | 35126d4c7cf99e3c5e4b4bea2734682f96ee3a2c /servers/physics_server_3d.h | |
parent | 0ee1179c1cce87c77efe70cd78399525444d587b (diff) | |
parent | 6a9ed72185a910f803fff91ef1f408ad91884d20 (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_server_3d.h')
-rw-r--r-- | servers/physics_server_3d.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index 8f83e360f2..a365802220 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -471,6 +471,10 @@ public: virtual void body_set_omit_force_integration(RID p_body, bool p_omit) = 0; virtual bool body_is_omitting_force_integration(RID p_body) const = 0; + // Callback for C++ use only. + typedef void (*BodyStateCallback)(void *p_instance, PhysicsDirectBodyState3D *p_state); + virtual void body_set_state_sync_callback(RID p_body, void *p_instance, BodyStateCallback p_callback) = 0; + virtual void body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata = Variant()) = 0; virtual void body_set_ray_pickable(RID p_body, bool p_enable) = 0; |