diff --git a/Characters/player.gd b/Characters/player.gd index 70dfa46..f0754c6 100755 --- a/Characters/player.gd +++ b/Characters/player.gd @@ -92,6 +92,10 @@ func _ready() -> void: leftEdgeSensor.target_position = Vector2(0, sensorDepth) rightEdgeSensor.position = Vector2(edgeSensorRange, 0) rightEdgeSensor.target_position = Vector2(0, sensorDepth) + # The sensors' parent is the EdgeSensors pivot, so exclude_parent doesn't + # cover us. Without this they can hit our own collider. + leftEdgeSensor.add_exception(self) + rightEdgeSensor.add_exception(self) # Rotates the sprite to sit on the wall or ceiling. Done in _physics_process # (not _process) so physics interpolation smooths it along with our movement.