Announcement

Collapse
No announcement yet.

How to force character to face direction before moving?

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

    How to force character to face direction before moving?

    Hi, How can I force a character to face the direction I want it to go ( with SimpleMoveTo or AddMovementInput ) before moving ?
    I have a space ship "character" and I want to simulate a thruster behind it, but it move asides while slowly turning...
    The best would be if I was able to thrust the space ship only toward but let it glide when it turn.
    Currently I was trying to remove every "left and right" velocity, but I can't figure out how to do it.

    Someone have an idea ?
    Thanks!

    #2
    Are you using physics for all your movement?

    Comment


      #3
      No, I am just using the default character movement component

      Comment


        #4
        I am open to idea ( like physics ) .If they works with "SimpleMoveTo" so I can still control Pawn with behavior tree
        Last edited by Pascx64; 08-17-2015, 09:19 AM.

        Comment


          #5
          can you compare ship's rotation with direction you want it to move and only then enable movement input?

          Comment


            #6
            You mean, ignore input while the ship is not facing the right direction ?
            How can I ignore the input of "SimpleMoveTo" ?
            Also, it would be nice if the ship was moving forward while turning. Currently it move forward AND aside... I need to detect side movement, I tried to get the velocity and compare it with the forward vector but I don't know how to cancel/remove the left and right movement...

            Comment


              #7
              Originally posted by Osok View Post
              Sometimes the planets align just right so that events transpire perfectly. For example, this post being right after that post.

              This may help boost you in the right direction.

              Comment

              Working...
              X