Announcement

Collapse
No announcement yet.

Vertical rotation of an object

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

    Vertical rotation of an object

    Hey there,

    Recently I've been working on a project in which I need to know the vertical rotation of an object/actor. For this I have tried using Rotation (see below), but when showing these values on screen I found out these are only horizontal rotation values. I can not find vertical rotation anywhere, I have scanned through actor and object several times without finding it.

    The values I displayed on screen were: Rotation.Pitch, Rotation.Yaw and Rotation.Roll.

    I've also tried typecasting to Vector and displaying those values, but whenever my actor's vertical rotation changed, none of those values changed. I'm pretty sure I'm either doing something wrong or just missing something here.

    Help would be appreciated! Thanks in advance.

    #2
    The actor's rotation (yaw, pitch or roll) should be changing, but what class are you working in? (E.g.awn, player controller, vehicle etc.)

    Some classes keep a separate rotator variable for the camera view rotation, separate from the actor's rotation, or may follow one actor while keeping their own rotation (the PlayerController for instance draw the screen view from the pawn it is controlling, but the pawn is usually only rotated around the Z-axis (yaw), not usually the Y-axis (pitch) or X-axis (roll)).

    Comment


      #3
      I am indeed working in Pawn class. After reading your reply I've tried displaying rotation values of the controller instead, and it showed vertical rotation perfectly fine!

      Thanks for clearing that one up, much appreciated!

      Comment

      Working...
      X