Announcement

Collapse
No announcement yet.

C++ climbing and vaulting system

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    C++ climbing and vaulting system

    Hi!! I'm currently working on my degree project, and as requirement I have to implement the gameplay through code, without any blueprints, I need help with the climbing and vaulting of my character, any help will be appreciated.

    #2
    Well, you should post here if you have any specific questions.

    People are happy to help out with specific issues but no one is going to do the work for you (unless you pay them).

    Comment


      #3
      Well, Ok, thanks for the tip, order66. I've worked on a way to find a ledge, and it works, using 2 traces, one to find a wall in front of the player, and the other one to get the height of the wall. Combining those two I managed to get the exact location of the ledge, but I don´t know how to use it with my character, I used the MOVE_Flying mode, but it looks weird, I need some advice about how to actually use it with my character. Thanks.

      Comment


        #4
        You might want to check this out:

        http://www.froyok.fr/blog/2011-06-code-exil-wall-jump

        It's UDK and UnityScript, but the logic should be relatively easy to port to UE4 C++ or Blueprint. At very least, reading the code should give you an idea of one way to achieve what you want. No matter what you do, you're likely to have to do a lot of trial and error to get good results. There are lots of edge cases here that will need to be dealt with to make it fun to play.

        Comment


          #5
          Thanks jeff_lamarche, I saw that page long ago and use the trace and rotation of the character towards the wall, now, the issue I'm having is ¿how to attach my character to the ledge location? Thanks for the help!!

          Comment


            #6
            @Aragonath- Will you be sharing your work as its done?
            Also, which approach are you tackling? Actor placement? Real-time calculation?
            Last edited by Horus; 09-11-2014, 07:46 PM.
            [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

            Looking for fellow programmers to develop a project.

            Comment


              #7
              Of course I will share it Horus!!! In fact, I was thinking to publish it on this thread as soon as i got a functional code with its detailed explanation!! My approach is: First, detect a ledge with two traces, so, I guess it's real-time calculation, each tick the trace looks for a collision ahead of the character. Then, with the location of the ledge saved on a variable, set the location of my actor with a little offset, as if it where hanging from the ledge, and then the player have the option to climb up o move towards the ledge. Right now that's my problem, because I've been changing the EMovementMode from MOVE_Walking or MOVE_Falling to MOVE_Flying, as I saw on some UDK threads, but it looks really weird. Sorry for my bad english guys.

              Comment


                #8
                @Aragonath- That sounds like a fairly simple approach, but you might have some issues as the vertical trace might 'accidentally' hit other meshes if they are close to one another... Go to paint, make a basic image showing your traces, that way someone who understands the procedure can explain to you the best way to make it ^^ cus according to your description, your method seems over simplistic..
                [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

                Looking for fellow programmers to develop a project.

                Comment


                  #9
                  Ok, I've made a sketch showing what I got:

                  Click image for larger version

Name:	Sketch.jpg
Views:	1
Size:	128.9 KB
ID:	1056604

                  Any advice will be appreciated!!!

                  Comment


                    #10
                    So here's my concern:
                    Click image for larger version

Name:	algorithm.png
Views:	1
Size:	31.0 KB
ID:	1056607
                    You see what the problem is? Your system will only detect offseted ledges, just like Alex's.
                    [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

                    Looking for fellow programmers to develop a project.

                    Comment


                      #11
                      I think the best way in handling this would trace for specific names so it grabs on to specific ledges by name. That way it's much more modular in design and can be changed in size or variation for whatever suits your need.

                      Typically when detecting ledges on objects you'll run into what Horus mentioned. Not only that but... I mean if you make a modular system your lower end programmers(If you have any) will be much more happy with you in the future.

                      Outside of that yeah i'd just handle it by calling custom animations from a function to really give that appeal and of course depending on the name of the object it's traced will determine the type of animation to see if it's a vine or concrete, ect, ect. Then of course use anim_montages to play the proper particle effects for dust falling or whatever additional effect you might want.
                      Third Person Camera Zoom Tutorial, Click Me!

                      Comment


                        #12
                        @MasterKyp- If you want to go with specific name meshes then well I think I have a simpler and more effective way:
                        Make a collision box in front of your player, check when it collides with LEDGE_ACTORS, and from there take the behaviour. Actors are better than named meshes because they are more generic and can be used on just about anything. Not only that, but you can program to take multiple options through the editor, such as one-sided vault, two-sided vault, drop and roll, drop and fall,etc. Its the same as mesh naming, but a tad more dynamic and scalable.
                        This way there is no need for continuous raycasting each tick.
                        I would love to hear Rama's opinion on the best way to do this.
                        Last edited by Horus; 09-12-2014, 08:08 AM.
                        [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

                        Looking for fellow programmers to develop a project.

                        Comment


                          #13
                          First of all, Thanks for your responses!! @Horus: I've based part of my code in Alex3D's climbing system, so, that's why the offseted ledges part, and @Master Kyp, that approach is very interesting, I would like to know which one would be the best and more efficient way, and according to that, I'll start the programming phase, and all tips and advices are welcomed!!!

                          Comment


                            #14
                            @aragonath- i think its a bad approach to use offseted only,though it is easier.you should ask rama or a epic programmer to see which appoach they would take
                            [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

                            Looking for fellow programmers to develop a project.

                            Comment


                              #15
                              Id rather use a procedural tracing method, by the end of the day if you use custom actors its going to be much more limiting than a procedural solution, meaning every object that looks that can be vaulted or climbed , it will be able to , Im nearly sure mirrors edge used mostly traces for its movement system ( not completly sure ) But it worked perfectly for them
                              Offering my Freelance Game Design ,Counselling and C++ Programming Skills!
                              https://forums.unrealengine.com/show...ner-Counseling

                              Marketplace Assets
                              Melee Tracing Plugin:https://forums.unrealengine.com/show...Tracing-Plugin
                              Medieval Combat Starter Kit:https://forums.unrealengine.com/show...at-Starter-Kit
                              Foliage To Blueprint:https://www.unrealengine.com/marketp...e-to-blueprint

                              Comment

                              Working...
                              X