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.
This commit is contained in:
parent
5b270278c8
commit
4f8d761be6
12 changed files with 99 additions and 0 deletions
|
|
@ -472,6 +472,7 @@ public:
|
|||
real_t margin = 0.08;
|
||||
bool collide_separation_ray = false;
|
||||
Set<RID> exclude_bodies;
|
||||
Set<ObjectID> exclude_objects;
|
||||
|
||||
MotionParameters() {}
|
||||
|
||||
|
|
@ -609,6 +610,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 PhysicsTestMotionResult2D : public RefCounted {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue