Merge pull request #74707 from mihe/recovery-as-collision
Add `recovery_as_collision` to extension binding of `_body_test_motion`
This commit is contained in:
commit
0c59e0c35b
3 changed files with 5 additions and 4 deletions
|
@ -606,7 +606,8 @@
|
||||||
<param index="3" name="margin" type="float" />
|
<param index="3" name="margin" type="float" />
|
||||||
<param index="4" name="max_collisions" type="int" />
|
<param index="4" name="max_collisions" type="int" />
|
||||||
<param index="5" name="collide_separation_ray" type="bool" />
|
<param index="5" name="collide_separation_ray" type="bool" />
|
||||||
<param index="6" name="result" type="PhysicsServer3DExtensionMotionResult*" />
|
<param index="6" name="recovery_as_collision" type="bool" />
|
||||||
|
<param index="7" name="result" type="PhysicsServer3DExtensionMotionResult*" />
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
|
|
@ -298,7 +298,7 @@ void PhysicsServer3DExtension::_bind_methods() {
|
||||||
|
|
||||||
GDVIRTUAL_BIND(_body_set_ray_pickable, "body", "enable");
|
GDVIRTUAL_BIND(_body_set_ray_pickable, "body", "enable");
|
||||||
|
|
||||||
GDVIRTUAL_BIND(_body_test_motion, "body", "from", "motion", "margin", "max_collisions", "collide_separation_ray", "result");
|
GDVIRTUAL_BIND(_body_test_motion, "body", "from", "motion", "margin", "max_collisions", "collide_separation_ray", "recovery_as_collision", "result");
|
||||||
|
|
||||||
GDVIRTUAL_BIND(_body_get_direct_state, "body");
|
GDVIRTUAL_BIND(_body_get_direct_state, "body");
|
||||||
|
|
||||||
|
|
|
@ -382,7 +382,7 @@ public:
|
||||||
|
|
||||||
EXBIND2(body_set_ray_pickable, RID, bool)
|
EXBIND2(body_set_ray_pickable, RID, bool)
|
||||||
|
|
||||||
GDVIRTUAL7RC(bool, _body_test_motion, RID, const Transform3D &, const Vector3 &, real_t, int, bool, GDExtensionPtr<PhysicsServer3DExtensionMotionResult>)
|
GDVIRTUAL8RC(bool, _body_test_motion, RID, const Transform3D &, const Vector3 &, real_t, int, bool, bool, GDExtensionPtr<PhysicsServer3DExtensionMotionResult>)
|
||||||
|
|
||||||
thread_local static const HashSet<RID> *exclude_bodies;
|
thread_local static const HashSet<RID> *exclude_bodies;
|
||||||
thread_local static const HashSet<ObjectID> *exclude_objects;
|
thread_local static const HashSet<ObjectID> *exclude_objects;
|
||||||
|
@ -394,7 +394,7 @@ public:
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
exclude_bodies = &p_parameters.exclude_bodies;
|
exclude_bodies = &p_parameters.exclude_bodies;
|
||||||
exclude_objects = &p_parameters.exclude_objects;
|
exclude_objects = &p_parameters.exclude_objects;
|
||||||
GDVIRTUAL_REQUIRED_CALL(_body_test_motion, p_body, p_parameters.from, p_parameters.motion, p_parameters.margin, p_parameters.max_collisions, p_parameters.collide_separation_ray, r_result, ret);
|
GDVIRTUAL_REQUIRED_CALL(_body_test_motion, p_body, p_parameters.from, p_parameters.motion, p_parameters.margin, p_parameters.max_collisions, p_parameters.collide_separation_ray, p_parameters.recovery_as_collision, r_result, ret);
|
||||||
exclude_bodies = nullptr;
|
exclude_bodies = nullptr;
|
||||||
exclude_objects = nullptr;
|
exclude_objects = nullptr;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue