Something like that. The function is a little redundant, though; you could either split it up into two functions (collidePlayerAndObjects and collidePlayerAndTiles) or just assume everything’s an object and check for tiles as a separate step to fix that.
Also, for your rotation warning, make sure all your objects aren’t rotated at all. Dusk’s “object is rotated” code isn’t anything special - it just checks the value from Tiled. If it reports an object as rotated, Tiled encoded it as rotated, which means it’s rotated in some sense or another. Don’t forget to check all your objects.
I believe I don’t have any rotated object in my maps.
I have already checked in Tiled, and I created just rectangle objects, with no rotation, they are parallel to the tiles. Do you know if somebody else faced this issue?
Can I create some kind of property on Tiled, like rotate:false?
I also believe the object can’t be culled because of this, and if it worked I guess the performance of my game would be a little bit better, right?
If that’s the case, can you please PM me the map Dusk claims has a rotated object in it? It could be that Tiled is reporting it in a weird way and I want Dusk to be able to handle that.
Hello @Caleb, I am trying to send you the json file, but I am receiving a message telling me I am not permitted to upload this kind of file. Is the json the file you need, right? How could I send it to you?