Announcement

Collapse
No announcement yet.

C++ climbing and vaulting system

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

    #16
    True,but while it can be a good thing having a dynamic approach,it can also be too much,meaning glitches,acessing areas you're not supposed to,and so on. I am a fan of procedural as well,but I'm not sure about it...
    Anyway how would you do it alvarofer0020?
    [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

    Looking for fellow programmers to develop a project.

    Comment


      #17
      @Horus: I used that approach because was the only one I found as a guide, and it was just for learning proposes, but thanks for that tip!!!! @alvarofer0020: The procedural tracing method is what I was Aiming from the beginning, but Master Kyp's idea is a really good option in case the procedural one fails. I'm trying to emulate Outlast's gameplay, the vaulting and climbing system isn't as complicated as Mirror's edge or Assassins Creed, ¿How would you guys do this???

      Comment


        #18
        @Aragonath- Assassin's creed uses an actor placement system, of this I'm 99% sure. Procedural tracing is the best way no doubt, but also the more complicated... in that field, I'm pretty sure I can't help you a lot, maybe alvarofer0020 or Master Kyp can, and I'll use their tips to learn as well ^^
        [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

        Looking for fellow programmers to develop a project.

        Comment


          #19
          Well, Thanks Horus, I'll share any update in the code I'll write. A quick question, ¿how can I attach my character to the ledge location?? I read something about a function called "setBase" in Udk, but I can't figure out how to use it.

          Comment


            #20
            Originally posted by Aragonath View Post
            Well, Thanks Horus, I'll share any update in the code I'll write. A quick question, ¿how can I attach my character to the ledge location?? I read something about a function called "setBase" in Udk, but I can't figure out how to use it.
            Attach your actor to the mesh actor keeping the relative offset
            [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

            Looking for fellow programmers to develop a project.

            Comment


              #21
              Originally posted by Aragonath View Post
              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!!!
              The nice part of programming is there really isn't a wrong way to do it. There are only more efficient ways of handling things. I personally would go with the idea of a volume-box that recognizes an actor in the area so long as a particular button is held.

              I believe this to be much more modular due to the fact that you could scale it in any way you wanted or shape it to specific ledges. The down-side to it is you'll want to place this on every conceivable ledge so for procedural generated terrains and maps you're going to run into an issue.

              Whether you use a mesh or actor or honestly anything so long as it fits your needs then it doesn't really matter in the end.

              Here is a quick RayTrace example to get the name of an actor. Simply use this function and name the actor whatever you want in the editor. This way if you can just make one, copy and paste it over and over and shape it however you'd like. This should help to get you started.

              ((P.S don't mind the messiness of the code! Organize it how you'd like. ))


              Code:
              FString * AProjectX2Character::GetName()
              {
              
              	FVector CameraLoc;
              	FRotator CameraRot;
              	GetActorEyesViewPoint(CameraLoc, CameraRot);
              
              
              	FVector StartTrace = CameraLoc;
              	FVector EndTrace = CameraLoc + (CameraRot.Vector() * 5000);
              
              
              	static FString testString;
              
              	FCollisionQueryParams TraceParams
              		(
              		FName(TEXT("GetName")),
              		false,
              		this
              		);
              
              	FHitResult HitResult;
              
              	if (GetWorld()->LineTraceSingle(HitResult, StartTrace, EndTrace, ECC_Visibility, TraceParams))
              	{
              
              		AActor * ActorTest;
              
              
              		if (HitResult.GetActor())
              		{
              			ActorTest= HitResult.GetActor();
              
              
              			if (HitResult.GetActor()->GetName() == "TestingName")
              			{
              				testString = HitResult.GetActor()->GetName();
              			}
              
              			else
              			{
              				testString = FString("Nothing");
              			}
              
              		}
              
              		else
              		{
              			testString = FString("Not an Actor");
              		}
              
              		GEngine->AddOnScreenDebugMessage(-1, 5.0, FColor::Red, FString::FString(testString));
              
              
              		DrawDebugLine
              			(
              			GetWorld(),
              			StartTrace, // Start Trace
              			HitResult.Location, // Hit Result Location
              			FColor(255, 0, 0), // Red
              			false, // Persistent Lines
              			5.0, // Time
              			0, // Depth Priority
              			5.0 // Thickness
              			);
              	}
              
              	return & testString; // return the address 
              }
              Third Person Camera Zoom Tutorial, Click Me!

              Comment


                #22
                Great!!! Thanks for the code Master Kyp, it will be very helpful, I'll give it a try, although it would be awesome to create a procedural climbing and vaulting system like Alex3D's one, in case someone is interested, we could team up to make it real. thanks for all the help and advices!!

                Comment


                  #23
                  Originally posted by Horus View Post
                  So here's my concern:
                  [ATTACH=CONFIG]11441[/ATTACH]
                  You see what the problem is? Your system will only detect offseted ledges, just like Alex's.
                  My system detects your number one concern, Horus, as you can see here: https://www.youtube.com/watch?v=1TjnWZhGyG8#t=173 ( minute 2:55 )




                  Aragonath, you could wait a little more and grab a copy of my system, and convert must of it to C++.
                  BASIC version can also be bought on Marketplace.
                  PRO version can be bought on my site only.
                  www.3dalex.com

                  Comment


                    #24
                    Thanks Alex3d!!! I'll study your system as soon as get a copy, and share my progress here

                    Comment

                    Working...
                    X