diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-19 08:28:04 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-24 17:34:55 -0700 |
commit | d9720d439545792bd742645f3c6e3f7c29327aa8 (patch) | |
tree | 3fcd3c843ac3464adeb2c2380780dabf6006c456 /servers/physics_server_3d.h | |
parent | 829fb4fba12d167ffe2280998d2f50431b2ccab3 (diff) | |
download | redot-engine-d9720d439545792bd742645f3c6e3f7c29327aa8.tar.gz |
Fix CharacterBody motion with RayShape
Make separation ray shapes work properly in move_and_slide, wihtout the
specific code in CharacterBody like before.
Now most of the logic is handled inside the physics server. The only
thing that's needed is to use ray shapes only for recovery and ignore
them when performing the motion itself (unless we're snapping or slips
on slope is on).
Diffstat (limited to 'servers/physics_server_3d.h')
-rw-r--r-- | servers/physics_server_3d.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index b8cbceacc7..c92e6629df 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -212,7 +212,7 @@ class PhysicsServer3D : public Object { static PhysicsServer3D *singleton; - virtual bool _body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, const Ref<PhysicsTestMotionResult3D> &p_result = Ref<PhysicsTestMotionResult3D>(), const Vector<RID> &p_exclude = Vector<RID>()); + virtual bool _body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, const Ref<PhysicsTestMotionResult3D> &p_result = Ref<PhysicsTestMotionResult3D>(), bool p_collide_separation_ray = false, const Vector<RID> &p_exclude = Vector<RID>()); protected: static void _bind_methods(); @@ -499,7 +499,7 @@ public: } }; - virtual bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = nullptr, const Set<RID> &p_exclude = Set<RID>()) = 0; + virtual bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = nullptr, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>()) = 0; /* SOFT BODY */ |