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

@ -283,7 +283,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 Physics2DDirectSpaceState *space_get_direct_state(RID p_space) = 0;
virtual void space_set_debug_contacts(RID p_space, int p_max_contacts) = 0;
@ -468,6 +468,9 @@ public:
virtual void body_set_pickable(RID p_body, bool p_pickable) = 0;
// this function only works on physics process, errors and returns null otherwise
virtual Physics2DDirectBodyState *body_get_direct_state(RID p_body) = 0;
struct MotionResult {
Vector2 motion;