No announcement yet.

Simple Flying Move to. How can this be achieved.

  • Filter
  • Time
  • Show
Clear All
new posts

    Simple Flying Move to. How can this be achieved.

    Hi All

    As a basic, all I want to to is have the player move in the Direction of the cross hairs when press W.

    I do not want to start deconstructing the Flyer Template.

    Just if I look down, he starts flying down. Look up fly up (Mouse).

    If I look Left and right, I would clamp it and person starts to turn left and right.

    I would like A & D to Strafe left and Right

    Q & E top go Directly Up and Down in relative.

    This will be a 0g world.

    At this point, I am not worried about roll, but later That would achieved maybe achieved with Z & C down the track, just movement for now.

    Is this achievable in the 1st or 3rd Person Template.

    I know how to set movement to flying and affect Gravity, but not luck from there on in.

    With Regards


    You can get actor's forward, right and up vector(cross product of forward and right vectors).

    You can move the pawn in any vectors direction like this:
        SetActorLocation(GetActorLocation() + Direction * DeltaTime * Speed); //Direction should be normalized - It can be up vector, forward vector or any other vector
    I hope this is what you were looking for.
    Gameplay programmer @ Techland by day
    Programmer @ Fireline Games at night



      I will see if I can convert that to BPs

      Cheers for the response.



        So I would get actor Transform, Location + Rotation * Delta Time * Vector - Would that be Get last Input Input Vector.

        Nah, I am lost LOL, sorry, thanks for the help anyhow.

        I thought it would be like.

        Press Q - Add Local Relative Location
        Press E - Ditto but a Negative.

        A & D would be the same the the Relative Location would be left or right.

        I think I am on the wrong track here.