actor won't collide with coins

gon213

  • Posts: 20
I've got the same problem again.
for some reason my player won't collide with the coin when jumping and moving at the same time.
I've set my coins as a sensor

JeffreyDriver

  • Posts: 1860
Check your collision shapes
Current Projects:
Retro Redux Compilation (NEW).
Retro Redux (untitled) (NEW).
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

gon213

  • Posts: 20
my collision shape is a square

Bombini

  • *
  • Posts: 1150
Its not important which shape you use (unless you use Simple Physics which does not accept round shapes). Important is which group it belongs to and if you set both actors (the one colliding with coins and the coins) to groups which can collide with each other (under seetings > groups).

gon213

  • Posts: 20
thanks for your help!
I'm still having the same problem though.
my player collides with them when he's only going one direction but as soon as his x and y position change at the same time he won't collide with them.

JeffreyDriver

  • Posts: 1860
Do you have different animations for jump left/ right? If so, check you collision shapes for those aren't sensors. The code you posted should work, so there's something else going on.

An alternative to collision shapes would be to check the distance between the actors, and pickup the coin if it's within a certain value.
Current Projects:
Retro Redux Compilation (NEW).
Retro Redux (untitled) (NEW).
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

gon213

  • Posts: 20
Thanks! Everything works now :)

JeffreyDriver

  • Posts: 1860
What was the problem?
Current Projects:
Retro Redux Compilation (NEW).
Retro Redux (untitled) (NEW).
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

gon213

  • Posts: 20
My actors running animations were two pixels taller that all my other animations. I had to make everything two pixels taller.