Is there a way for an object with pathfinding behavior to be mirrored or non-mirrored depending on whether it moves left or right?
You can compare Sprite.Pathfinding.MovingAngle
+ System: Sprite.Pathfinding.MovingAngle is between -90 and 90 degrees -> Sprite: Set not mirrored + System: Else -> Sprite: Set mirrored
Thanks for the reply, but I don't want a mirrored depending on rotation because the sprite is like a bat enemy and doesn't rotate, it just changes direction.
Thanks for the reply, but I don't want a mirrored depending on rotation
It won't be if you use Sprite.Pathfinding.MovingAngle expression.
Develop games in your browser. Powerful, performant & highly capable.
I have tried with movingangle but it doesn't work properly. Could it be with an extra behavior and control the x position at all times?
Could it be with an extra behavior and control the x position at all times?
I'm not sure what you mean. Could you share your project file or a screenshot of events?
one liner:
set width to: Self.Pathfinding.MovingAngle > 270 | Self.Pathfinding.MovingAngle < 90 ? abs(Self.Width) : -abs(Self.Width)
Self.Pathfinding.MovingAngle > 270 | Self.Pathfinding.MovingAngle < 90 ? abs(Self.Width) : -abs(Self.Width)