Improved kinematic body 2D and 3D, Now can move rigid body

This commit is contained in:
Andrea Catania
2018-02-16 19:06:00 +01:00
parent da612c324c
commit 6ed392f47a
22 changed files with 96 additions and 88 deletions

View File

@ -217,7 +217,7 @@ class Physics2DServer : public Object {
static Physics2DServer *singleton;
virtual bool _body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, float p_margin = 0.08, const Ref<Physics2DTestMotionResult> &p_result = Ref<Physics2DTestMotionResult>());
virtual bool _body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin = 0.08, const Ref<Physics2DTestMotionResult> &p_result = Ref<Physics2DTestMotionResult>());
protected:
static void _bind_methods();
@ -479,7 +479,7 @@ public:
Variant collider_metadata;
};
virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, float p_margin = 0.001, MotionResult *r_result = NULL) = 0;
virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin = 0.001, MotionResult *r_result = NULL) = 0;
/* JOINT API */