akesterson / moonlight-skulk

(No longer supported) moonlight-skulk is the temporary name of my #indie3jam entry : a JRPG style adventure game with a stealth mechanic
http://moonlightskulk.aklabs.net/
MIT License
0 stars 0 forks source link

Player and AISprite entities do not collide visibly #35

Closed akesterson closed 10 years ago

akesterson commented 10 years ago

This appears to be worst when the player is walking to the left.

Touching people does not alert them either.

akesterson commented 10 years ago

In tests, I haven't been able to make the player able to walk through the AI. i think this is likely a result of the way AI path following is handled with tweens. The tweens don't check collisions against the player, and hence they walk right through you.

pdoughty commented 10 years ago

Typically collisions are not checked with any tweening engine (doesn't matter if its unity, unreal, or custom). I've found that moving the AI via physics makes everything much easier to control and collisions should also work. On Jul 5, 2014 2:11 PM, "Andrew Kesterson" notifications@github.com wrote:

In tests, I haven't been able to make the player able to walk through the AI. i think this is likely a result of the way AI path following is handled with tweens. The tweens don't check collisions against the player, and hence they walk right through you.

— Reply to this email directly or view it on GitHub https://github.com/akesterson/moonlight-skulk/issues/35#issuecomment-48092787 .

akesterson commented 10 years ago

@pdoughty That's true, tweens didn't check collisions. In further digging though I found that the logic in GameState.update() should have been solving the problem through a few explicit collision checks between the AI and the player, and it wasn't. I opened a topic at the Phaser forums for the confusingly different behavior between .collide() and .overlap(), either it's a bug or I didn't know what I was doing.

(TL;DR - a pair of arcade physics bodies can be overlapping, but somehow the collision function will still return false?)