Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    How does detecting map collision work?

    Help
    2
    2
    189
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      WaltonSimons last edited by

      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.

      1 Reply Last reply Reply Quote 1
      • Dave
        Dave Fuze Team last edited by

        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/setSpriteCameraRotation

        You 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!

        1 Reply Last reply Reply Quote 2
        • First post
          Last post