Announcement

Collapse
No announcement yet.

Get sliding working

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

    Get sliding working

    Has anyone got sliding to work on a pawn? i'm after a small distance slide. Example, if button is hit. He slides for 10 to 15 feet. I've got everything working but the pawn to actually slide for that distance.

    Any ideas how to make him act like he's on ice or oil?
    I remember coldscooter asking about this. Was wondering did you figure it out?

    #2
    I think I would create a new state in my PlayerController, call it PlayerSliding, on Tick() make the character move in a certain direction that gets set at Begin:. Also in Tick(), add up the DeltaTime to something until enough time has passed, then change back to PlayerWalking.

    Would that work?
    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

    Comment


      #3
      Yeah that would do the job. What i'm looking for is what do they use for a fiction setting on the pawn. I can not seem to find what var makes him stick to the ground.

      Example: in the physics volume code.
      var float GroundFriction; // This property allows you to control how much friction you will have as you move across the ground while within the volume. This can be used to simulate slippery surfaces such as ice or oil

      I'm looking for something like this var.

      Comment


        #4
        gamepainters I was never able to get GroundFriction to affect anything. I left it assuming this would control rigid body sliding (I could be wrong, it's been a while).

        I couldn't find anything in the codebase for sliding. If you find anything, I'd love to hear.

        Comment


          #5
          https://www.youtube.com/watch?v=gxsQh-Obp9U does any one have this? t has sliding AND, it is pretty useful if so please share : D. I hope it helps.
          Some cool unreal projects you may like!


          Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

          Download the demo Download the demo
          external link Dropbox DropBox

          Become a c++ Professional now C++ Networking Tutorial

          Comment


            #6
            After seeing the video the slide is in the physical material. If you open it up there are many slide vars that can be set. but the problem with this is. I don't want just a certain material to activate the slide. I'm after a slide at anytime and anywhere.
            When I hit the button. I want that to make him slide.

            Comment


              #7
              ok I got this half working. Add this function and you will get the physical material below your feet. then you can change the properties of that material to get the pawn to slide. Once you've set the vars in the material and slides over you will need to set them back to what they were.

              Code:
               simulated function PhysicalMaterial GetSlideMatBelowFeet()
              {  
              local vector HitLocation, HitNormal;
               local TraceHitInfo HitInfo;  
              local actor HitActor;  
              local float TraceDist;
              
              TraceDist = 1.5 * GetCollisionHeight();
              HitActor = Trace(HitLocation, HitNormal, Location - TraceDist*vect(0,0,1), Location, false,, HitInfo, TRACEFLAG_PhysicsVolumes);
              
              if( (WaterVolume(HitActor) != None ) || (HitInfo.PhysMaterial != None) )
              {      
                   //`log("PBPawn::GetSlideMatBelowFeet() HitInfo.PhysMaterial = "$HitInfo.PhysMaterial);      
                   return HitInfo.PhysMaterial;      
              }    
              return none;   
              }

              Comment


                #8
                After few days of thinking about this. The above code wont work for what i'm doing. Once it gets changed it effects all players not just you. I need something that only effects the pawn who hits the button to make it happen to him not everyone.

                Comment

                Working...
                X