Announcement

Collapse
No announcement yet.

How do I freeze/hold a pawn? Even in mid air? (TPP character)

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

    How do I freeze/hold a pawn? Even in mid air? (TPP character)

    Effectively I'm trying to remove velocity, or rather set it to "zero" on all axis for the player pawn. (to hold them in mid air)

    Sorry if the title is too simplistic; I'm looking for a way to halt all motion a character is experiencing for a set amount of time. Character Movement is what I'm trying to freeze.

    Imagine jumping, then holding a button to stop your motion (keeping you stuck in the air until you release said button).
    It sounds like a strange goal, but I need this to do a lot of things in my game. Ideally, I want to control how long the character stays stuck in one place (possibly a timer of some kind as well).

    Thank you for any assistance
    Last edited by Aumaan Anubis; 09-13-2015, 04:34 AM.

    #2
    You can just set the velocity to zero in the character movement component.
    Click image for larger version

Name:	zerovelocity.png
Views:	1
Size:	39.3 KB
ID:	1087523
    Logitech Wheel Plugin

    Comment


      #3
      Event tick doesn't seem to stop all motion, it only slows the characters motion, but it's still not a complete halt. It seems that Event tick isn't fast enough, like the character is moving in between ticks.

      EDIT: It seems that simply removing velocity isn't enough to stop character motion, I have it set to Face Button Right, and it does hold the character in place...somewhat, the character is still able to move and fall, just 'very slowly' for some reason.
      Last edited by Aumaan Anubis; 09-13-2015, 10:33 PM.

      Comment


        #4
        Can you change it to a static?

        Comment


          #5
          I haven't had any success trying to change it to static, I'm not sure if I'm doing it correctly though. However, I'm unsure if that method would lead to future consequences or not relating to other elements :/

          Comment


            #6
            Click image for larger version

Name:	hold in air.PNG
Views:	1
Size:	139.7 KB
ID:	1087708

            Try this!
            Last edited by gillall; 09-16-2015, 10:18 AM.

            Comment


              #7
              Set the 'character movement mode' to flying, and also drag the pin off of the 'character movement' Node and search for 'stop movement immediately'

              That should work if you then reset your movement mode to 'walking' afterwards when you need to start moving again.

              EDIT: This is showing an issue when replicating. This method of freezing the character by changing the movement mode and using the ‘stop movement immediately’ Node - only works for the client if you use a custom event that runs on the server, otherwise the client’s movement mode just doesn’t change and the ‘stop movement immediately’ node only stops very briefly
              Last edited by JoeAlbi; 11-17-2019, 03:37 PM.

              Comment


                #8
                What if I am In a vehicle driving it ? I cant set use Disable Movement or Set movement mode non because the character will just stop mid air while the train moves forward.. unless I attach it to the Train witch seems to work but does not replicate well in multiplayer ...

                Comment


                  #9
                  You need to, at a minimum, also turn off gravity for the body/bodies simulating the actor.
                  However, perhaps better, would be to deactivate the "simulate physics" property for the body/bodies.
                  Then re-active them when you want to start simulating again.
                  Might want to make sure to save the previous velocity and restore it when you resume again.

                  Click image for larger version

Name:	stop-in-mid-air.png
Views:	1285
Size:	111.2 KB
ID:	1775886
                  Last edited by jwatte; 06-14-2020, 01:38 PM.

                  Comment

                  Working...
                  X