Add motion parameter to toggle whether recovery is reported as a collision
This makes the intent explicit in each use case.
This commit is contained in:
@ -485,6 +485,7 @@ public:
|
||||
bool collide_separation_ray = false;
|
||||
RBSet<RID> exclude_bodies;
|
||||
RBSet<ObjectID> exclude_objects;
|
||||
bool recovery_as_collision = false;
|
||||
|
||||
MotionParameters() {}
|
||||
|
||||
@ -727,6 +728,9 @@ public:
|
||||
|
||||
Array get_exclude_objects() const;
|
||||
void set_exclude_objects(const Array &p_exclude);
|
||||
|
||||
bool is_recovery_as_collision_enabled() const { return parameters.recovery_as_collision; }
|
||||
void set_recovery_as_collision_enabled(bool p_enabled) { parameters.recovery_as_collision = p_enabled; }
|
||||
};
|
||||
|
||||
class PhysicsTestMotionResult2D : public RefCounted {
|
||||
|
||||
Reference in New Issue
Block a user