Hello,
I've seen people ask how to use the mirror action with sine behavior. This is useful for use with enemies if we want them to patrol an area using the sine behavior.
I found a simple way using the "Value" property of the sine behavior.
The Value property works like this:
Suppose we want a magnitude: 50 (you can choose any value). Then the sprite will go from 0 to 50 and when it arrives 50, it will return back to reach -50.
And that's the Value, go from "-Magnitud" to "+ Magnitude":
Applying this, there is a simple way to make the mirror.
When "Value" is greater or equal to "-1 magnitude (ie, 49)" then it will mirror.
When "Value" is less or equal "- magnitude +1 (ie, -49)" then will mirror.
This is the result:
I hope you find it useful.
Here is the example .capx ;)