How does detecting map collision work?
-
I've tried creating platformer game with map created in map editor. I've set collisions for platforms but detect map collision function doesn't return true when my sprite passes through them.
Then I tried that demo with ball that turns red when it touches the walls and it looks like the collision map is drawn independently from map image as the ball still turned red on walls even when I commented out functions that draw the map. I hope this doesn't mean that we can't manipulate collision map coordinates and scale as this would make drawing map with scale, rotation and custom coordinates useless.
Unfortunately GothicVania demo was probably made before these functions were added as it builds its map based on array of numbers instead of built-in map system so it didn't help me with it. -
Hi Walton
You're correct, the gothicVania demo was indeed made before the map functions were added. I will be looking to include a remade version of that demo which uses the sprite commands for a future update.
The good news is that you can absolutely manipulate the collision map coordinates and scale. The setSpriteCamera function is what you need here. I've linked to the help page just below:
https://fuzearena.com/help/view/setSpriteCamera
https://fuzearena.com/help/view/setSpriteCameraRotationYou can also use setSpriteCollisionShape to adjust the collision box around your sprite:
https://fuzearena.com/help/view/setSpriteCollisionShape
Hope this helps, let me know if I can help further!