spawning too many actors on collide

Wonder MaruWonder Maru Member, PRO Posts: 98
edited February 2016 in Tech Support

Hi everybody,
I have a bug on the game I'm working on I can't understand. Check the screenshot here:

When I tap on the screen, the mouse stand still and everything moves down of a certain amount of pixels on every tap (I used an interpolate on the Y position to move things down).

When an obstacles (in this case the paws you see on top) collide with the red line a new obstacles is spawned on top of the screen.

During the game the character changes its size (getting bigger), so I need to have more space between obstacles as the game goes on. To do this I constrain the red bar Y to 3 times the character size starting from the top of the screen. So if the character is 30 in the beginning, the bar on top is 90 from the top edge of the screen, so the distance between obstacles is 90. When the character is 40, the distance is 120 and so on...

This works perfectly. But sometimes, after a while I'm playing and maybe (not sure if that's the cause) when I tap faster, I get two obstacles really close one to the other or even overlapped.

How's that possible? There's just one collider, it's like it detects the collision twice or something.

Can this be because I use an interpolation to move things? I can try using a change attribute instead, as a test.

Any ideas?

THANKS!

PS: in the real game the collider red bar is 0 px tall, I made it bigger just for the screenshot.

Wonder Maru: casual games for casual people. www.wondermaru.com

Comments

Sign In or Register to comment.