summaryrefslogtreecommitdiff
path: root/servers/physics_server_3d.h
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2021-09-30 11:05:30 -0700
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2021-10-04 12:27:42 -0700
commit4f8d761be632a9d342655aa88a0745465b2177b8 (patch)
tree4ad9b5bffd91a1ce2a30a8a60621e6ccfbadd8fa /servers/physics_server_3d.h
parent5b270278c869461a3dce2c0d0db71e0beaa50685 (diff)
Fix physics glitch with TileMap moving platforms
Added a parameter in test_body_motion to exclude attached objects from collision, used to avoid collision with all TileMap tiles with moving platform motion instead of just the one tile the character touches. Same changes made in 3D for consistency, and handling potential similar cases.
Diffstat (limited to 'servers/physics_server_3d.h')
-rw-r--r--servers/physics_server_3d.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h
index 3d884de095..c609afc11e 100644
--- a/servers/physics_server_3d.h
+++ b/servers/physics_server_3d.h
@@ -491,6 +491,7 @@ public:
int max_collisions = 1;
bool collide_separation_ray = false;
Set<RID> exclude_bodies;
+ Set<ObjectID> exclude_objects;
MotionParameters() {}
@@ -805,6 +806,9 @@ public:
Vector<RID> get_exclude_bodies() const;
void set_exclude_bodies(const Vector<RID> &p_exclude);
+
+ Array get_exclude_objects() const;
+ void set_exclude_objects(const Array &p_exclude);
};
class PhysicsTestMotionResult3D : public RefCounted {