Collisions are not working properly

Thunder35

  • Posts: 11
I've started trying to get collisions to work. The event for the collision is working fine -- the game restarts as it should -- but the problem is that the collision happens way too soon. The game is an avoidance game where the enemies fall from the sky and the player moves left/right to avoid them. The enemies will stop and the collision event will start before the enemy is even close to the player. When I turn the restart off (and leave the collision on) all of the enemies stop above the player's head and leave a huge gap. The enemies stay still in the air even when I move away.

I'm probably just missing something. Any help would be appreciated! if you need to know anything more about my problem just ask. Also, if there's already an answer to this (sorry if there is, I tried to look through the forums already) feel free to direct me there.

rob1221

  • *
  • Posts: 9473
Check your collision shapes to make sure they are not too large.

Thunder35

  • Posts: 11
I just checked. They were a bit big and so I adjusted them, but that didn't fix the problem. There's still a big gap between the player and the enemy when the collision happens.

Tuo

  • *
  • Posts: 2469
Perhaps upload the game to StencylForge (and make it public) so we can take a look at the issue directly. Most of the time it's cause of collision shapes, and if it's not, it's going to be harder to find.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Thunder35

  • Posts: 11
If you would look at it, that'd be great. I would really, really appreciate it. I just uploaded it to StencylForge (sorry it took so long, just had some sign-in problems).

Tuo

  • *
  • Posts: 2469
I'll try to get to it tonight. I'm working on something else at the moment though.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Tuo

  • *
  • Posts: 2469
I just tried it with the debugging drawing turned on. It seems as though your triangular collision for the precip is far below the actual rain actor when it's actually in the game (dunno why it's buggy, just is). I deleted it and then the game worked fine.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)