Page 1 of 1

Mirror flip fixture

Posted: Sat Aug 08, 2015 10:37 pm
by UKDeveloper99
Anyone got a script to mirror flip a fixture in the x or y? Save me making one. Couldn't find it on here with the search.

Re: Mirror flip fixture

Posted: Sun Aug 09, 2015 12:25 am
by iforce2d
Scaling by a negative factor will do that, as shown in the intro video:
https://www.youtube.com/watch?v=WqLR4dFn1qE#t=9m5s

One axis of the scale needs to be constrained. More details here:
https://www.youtube.com/watch?v=1UUHSezu96g#t=19m29s

Re: Mirror flip fixture

Posted: Wed Aug 26, 2015 3:40 pm
by UKDeveloper99
Perfect thanks, do I need to reverse vertex winding when I do that?

Re: Mirror flip fixture

Posted: Wed Aug 26, 2015 5:39 pm
by iforce2d
No, it will reverse it for you when it detects a negative scale.

EDIT: For bodies and fixtures the above is true. If you negative scale vertices though you would need to take care of winding reversal yourself if it's needed.