How to stop sprite from flipping on collision

Get help using Construct 2

Post » Sat Jul 14, 2012 3:45 pm

Hi guys,
I have sprites that bounce horizontally between 2 walls and mirror to the direction they are supposed to be facing(its a baby crawling in one direction). The problem is they also flip vertically when I use the bullet behaviour. Is there any way to prevent this. I used a pick all instances and make "not flipped" but that doesnt work.
B
6
Posts: 16
Reputation: 882

Post » Sat Jul 14, 2012 4:07 pm

I guess you're setting the angle, and objects rotated through 180 degrees are facing the other way but also appear flipped.

Try:
- not setting the object's angle, and manually using 'set mirrored' depending on its direction
- use 'set flipped' instead of 'set not flipped' to correct the flipping!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Sat Aug 11, 2012 5:00 am

Hi Ashley,

After alot of trial and error I managed to get it working but I needed to add a wait action before performing the flip.

I'm not sure why this is happening. I've included the capx on dropbox.

When the capx runs initially it will show the problem with flipping only once.

I have disabled the wait commands on the event sheet but when they are active the flipping seems to work perfectly.Baby Wall CAPX
B
6
Posts: 16
Reputation: 882


Return to How do I....?

Who is online

Users browsing this forum: Muini and 28 guests