Announcement

Collapse
No announcement yet.

I want to do something with jumping...

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

    I want to do something with jumping...

    I am trying to get in something for when my character is jumping. I want to make the jump have a little more control, like back in the 90's and the like.

    Basically, here's what I want to do with my jumping script:

    -When the jump button is pressed, the game checks if the character is in the air. (This is easy to work out.)

    -When it is released mid-jump, vertical velocity reverts to zero if it's not already zero. (The problem; I can't find a way to make this happen.)

    First of all, I want to have the game check what the vertical velocity of my character is.
    If it's greater than zero, I want the game to make it zero in that instant.

    #2
    Have you try to use the Blueprint node "Launch Character"? Set the launch velocity to 0 in all axis, and check the "Z override" button, so that the velocity is replaced and not added

    Comment


      #3
      You have access to movement controls in the air on the CharacterMovement component itself.

      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	49.1 KB
ID:	1108174
      Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

      Comment


        #4
        Originally posted by DevilsD View Post
        You have access to movement controls in the air on the CharacterMovement component itself.

        [ATTACH=CONFIG]97448[/ATTACH]
        In practice, that doesn't help me at all. I could set the jump velocity to anything I want and the maximum jumping time to whatever, there's still that arc that comes up when I release the key.

        Comment


          #5
          So you want it so that when the key is released, all vertical velocity stops (essentially hovering/floating)? The character would have to be switched to Flying once they left the ground, if that was the case. Or you could possibly switch them over to Flying when the key is released.

          Could be an option?

          Comment


            #6
            Originally posted by Yggdrasil View Post
            So you want it so that when the key is released, all vertical velocity stops (essentially hovering/floating)? The character would have to be switched to Flying once they left the ground, if that was the case. Or you could possibly switch them over to Flying when the key is released.

            Could be an option?
            It would be frustrating, but that may be an option. However the thing is I don't want my character's horizontal velocity to change when the jump key is released though. I don't know whether or not changing the movement from falling to flying would cause something like that to happen.

            Comment


              #7
              Originally posted by preadatordetector View Post
              It would be frustrating, but that may be an option. However the thing is I don't want my character's horizontal velocity to change when the jump key is released though. I don't know whether or not changing the movement from falling to flying would cause something like that to happen.
              Changing it to "Flying" would definitely help with fighting the Gravity. :P Your best bet is to set the "Velocity" variable of the Character Component by hand.

              Get the Current Velocity of the Actor(!) (not the Component) and set the "Velocity" of the Component (!) to (0, 0, ActorVelocity.Z).
              With this the Upwards velocity stays while the forward, backward, left and right movement stops.
              Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

              My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
              (Including 100+ Pages Multiplayer Network Compendium to get you started.)

              Comment

              Working...
              X