collinhover / impactplusplus

Impact++ is a collection of additions to ImpactJS with full featured physics, dynamic lighting, UI, abilities, and more.
http://collinhover.github.com/impactplusplus
MIT License
276 stars 59 forks source link

Setting collision map tiles to 8x8 stops all movement. #121

Closed danielmahon closed 10 years ago

danielmahon commented 10 years ago

Not sure why this seems to be happening, I must be missing something. But if I have a 16-30x20 map and set the collision map to 8-60x40 all movements seem to stop. Specifically I only have 1 creature on the map and it does not wander. Any thoughts? If I set the collision map back to the "norm" all is fine.

collinhover commented 10 years ago

Are you using both pathfinding and collision maps? If so, their tile sizes must match.

Pattentrick commented 10 years ago

Damn @collinhover! You was just a few seconds faster than me ;-)

@danielmahon see

https://github.com/collinhover/impactplusplus/blob/dev/lib/plusplus/helpers/pathfinding.js#L46

for details on that. Is there a particular reason for using a different tile size on your pathfinding map?

collinhover commented 10 years ago

Assuming this is fixed unless you tell us otherwise. Hope it is working for you, but feel free to reopen the issue if not!