Announcement

Collapse
No announcement yet.

Set camera rotation to behind the players back?

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

    Set camera rotation to behind the players back?

    Been fidling around with add controller yaw input and setting a branch where it stops moving when the position of the camera is equal to the players back by getting the forward vector of the arrow component, multiplying by -1 to get the opposite value, however I am not getting what I want. Any suggestions? Thanks in advance.
    If you want to see my UDK games, have a look at my website!

    #2
    The opposite of 0 isn't 0, it's 180. You want to add 180 to your rot and maybe % it by 360
    YouTube channel: https://m.youtube.com/channel/UC1qaQM1VnY441J5lCLCPMwg

    Comment


      #3
      Originally posted by Ispheria View Post
      The opposite of 0 isn't 0, it's 180. You want to add 180 to your rot and maybe % it by 360
      How would I clamp it so it doesnt rotate the camera endlessly?
      If you want to see my UDK games, have a look at my website!

      Comment


        #4
        thats the % 360 part, so if it ends up at 375, then it'll go back to 15. Or maybe I'm thinking of the wrong thing, but if I am, then you can just subtract 360 from it if it's over 360
        YouTube channel: https://m.youtube.com/channel/UC1qaQM1VnY441J5lCLCPMwg

        Comment


          #5
          Originally posted by Ispheria View Post
          thats the % 360 part, so if it ends up at 375, then it'll go back to 15. Or maybe I'm thinking of the wrong thing, but if I am, then you can just subtract 360 from it if it's over 360
          EDIT: Doesn't work, the idea is to have the rotation clamp to the back of the player regardless of its current position. What it does now it continuously rotate around.
          Last edited by UpARiver; 02-29-2016, 11:42 AM.
          If you want to see my UDK games, have a look at my website!

          Comment


            #6
            Bump. EDIT: Doesn't work, the idea is to have the rotation clamp to the back of the player regardless of its current position. What it does now it continuously rotate around.
            If you want to see my UDK games, have a look at my website!

            Comment

            Working...
            X