Navigation

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

    Learning 2D platform collision detection

    Beginners
    5
    7
    288
    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.
    • Tratax
      Tratax F last edited by

      Hey everyone, seeking some input for this one.. so i've taken a shot at a simple 2D platformer.. just can't work out how to get collision detection working well

      What you're seeing is just a big triangle collision object, ideally i'd like the character to run up the triangle and then fall at the end

      Open to any feedback, ideas.. I feel the problem is how im doing my velocity control? not sure though....

      1 Reply Last reply Reply Quote 2
      • xevdev
        xevdev F last edited by

        Could probably add to the y pos axis so it goes up the screen a bit and keeps on falling onto the collision object or alter your y velocity so you don't pass through the boundary or both.

        1 Reply Last reply Reply Quote 0
        • SteveZX81
          SteveZX81 F last edited by

          I'm bumping this in the hopes some bright spark can fix it for you, as I've tried to do a platformer a couple of times and can never get the collisions working right at all.

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

            Is this using a Map or something else? Sorry, I can't see the code well enough to tell

            Tratax 1 Reply Last reply Reply Quote 0
            • Tratax
              Tratax F @Martin last edited by Tratax

              @Martin Yup, using a map and collision objects from the built in editor

              1 Reply Last reply Reply Quote 0
              • Tratax
                Tratax F last edited by

                Code for this is: NK4N3MND5E if you'd like to check it out @Martin ?

                1 Reply Last reply Reply Quote 1
                • F
                  faz808 F last edited by

                  Looks great, only wish I could help.

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