Collisions Removed in versions > 0.8.0?

36 views
Skip to first unread message

ZombieZapperZoe

unread,
Nov 30, 2018, 7:10:33 PM11/30/18
to Crafty
collisions are working on version 0.7.1 but seem to not work at all in 0.8.0 and up. Any work arounds, I want to use the latest version.

starwed

unread,
Dec 1, 2018, 11:10:28 AM12/1/18
to Crafty
For performance reasons, there were several breaking changes in the last version.  Check out the upgrade guide here: https://github.com/craftyjs/Crafty/wiki/Notes-for-upgrading-to-Crafty-0.9.0

The tldr is that
- If you bind to the 'Moved' event anywhere, you'll need to use 'Move' instead
- if you were using the `normal` property on collision results, you'll want to use nx and ny instead
- If you're using map.search and setting the filter flag to false, you should use map.unfiltered instead

If the upgrade guide isn't helping, post some sample code here and I'll try to figure out what's going wrong.
Reply all
Reply to author
Forward
0 new messages