Navigation

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

    Not jumping through top tile

    Beginners
    2
    5
    378
    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.
    • poof92
      poof92 last edited by

      I'm playing around with the tutorial game and when I jump with a tile right above me I get stuck in it and the go right through to the top!

      1 Reply Last reply Reply Quote 0
      • Kat
        Kat Fuze Team last edited by

        I can't guarantee this is the best way, but I seem to have got it working by adding a collision check around line 207 which resets the velocity to 0 if true:

        if collision( playerX + psize.x / 2, playerY + velocity) then
            velocity = 0
        endif
        

        This doesn't work if the tiles are only 1 space apart though, as the character is too tall to fit between them. It also makes more clear the collision problems moving left and right so more checks are probably needed, but see what you think :)

        poof92 2 Replies Last reply Reply Quote 0
        • poof92
          poof92 @Kat last edited by

          @kat awesome thanks so much I'll give it a try

          1 Reply Last reply Reply Quote 0
          • poof92
            poof92 @Kat last edited by

            @kat it works amazingly thanks

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

              Great! Glad I could help 😊

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