1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Added new API to get body direct state

This commit is contained in:
AndreaCatania
2017-09-29 17:33:30 +02:00
parent dee1001390
commit c56c67db39
9 changed files with 56 additions and 3 deletions

View File

@@ -276,7 +276,7 @@ public:
virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) = 0;
virtual real_t space_get_param(RID p_space, SpaceParameter p_param) const = 0;
// this function only works on fixed process, errors and returns null otherwise
// this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectSpaceState *space_get_direct_state(RID p_space) = 0;
virtual void space_set_debug_contacts(RID p_space, int p_max_contacts) = 0;
@@ -464,6 +464,9 @@ public:
virtual void body_set_ray_pickable(RID p_body, bool p_enable) = 0;
virtual bool body_is_ray_pickable(RID p_body) const = 0;
// this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectBodyState *body_get_direct_state(RID p_body) = 0;
struct MotionResult {
Vector3 motion;