Announcement

Collapse
No announcement yet.

Pawn's Current Movement Direction (Inertia)

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

    Pawn's Current Movement Direction (Inertia)

    How may I reference the inertia of a pawn?

    Object: The blueprint has a mesh at the root and uses Add Impulse to apply physics force and move the pawn around a space environment.

    Example: The spaceship is moving in some direction, and turns in place, but still moving that direction (until another impulse force is applied).

    Question : How do I access the direction and velocity it is still moving in?

    #2
    You can get the velocity of any actor by calling the Get Velocity node. To get the movement direction, just normalize the velocity.
    Logitech Wheel Plugin

    Comment


      #3
      Originally posted by drb1992 View Post
      You can get the velocity of any actor by calling the Get Velocity node. To get the movement direction, just normalize the velocity.
      Oh geez, of course. derp.

      Thank you! I was able to calculate the point ahead of the ship's drifting direction correctly now:

      Vector3 PointInFront = current_position + (normalize(velocity) * distance_ahead);

      Comment

      Working...
      X