Use isColliding with a tag as opposed to a specific object? #209
-
Hi, I'm trying to prevent a player from moving when it's colliding with an object. I'm already using solid, area and pushOutAll to stop the player when it hits the object, but there's some tunneling happening. (The player forces its way into the object when the user keeps the player accelerating.) The fix I'm trying to do is to prevent acceleration when the player is touching an object. Something like:
but it seems isColliding only accepts an object, and not a tag. And "player.collides" is about triggering a function and not checking a state. Thank you for any ideas! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are you using the beta version? Tunneling should be impossible in beta if you give both objects |
Beta Was this translation helpful? Give feedback.
Are you using the beta version? Tunneling should be impossible in beta if you give both objects
solid()
and use.move()
for movement, nopushOutAll()
needed. (see the rpg example)