Announcement

Collapse
No announcement yet.

Rotating character to pitch of camera

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

    Rotating character to pitch of camera

    http://youtu.be/FB1CJ0-5Uyc

    What i want to do is rotating and moving character where camera is looking. In video you can see it rotates left and right with no problem but when it comes to up and down, even though characters moves where camera looking, only camera rotates.

    What i tried:

    1. Checking "Use Controller Rotation Pitch": When I do this, character rotates but camera does not follow it. Camera looks down too (you can see in the video).

    2. https://wiki.unrealengine.com/Bluepr..._Pawn_Tutorial -- Steering pitch like in this link. Didn't help either. The result was:
    a. Camera and characters goes opposite rotations
    b. character does not swim up and down

    3. Checking "Orient Rotation to Movement": It is not what i wanted. It rotates up and down only in movement.

    Any advice?

    #2
    Hey, are you using a spring arm ? (i think this is how it is called)
    You can set your camera to be a child of the spring arm component and it has options to deal this kind of stuff.

    Comment


      #3
      @Raikoh i tried those things too (also my camera is a child of spring arm).

      With Lojo's advice from here https://answers.unrealengine.com/que...of-camera.html i set up my blueprint like this Click image for larger version

Name:	blueprint.JPG
Views:	1
Size:	92.0 KB
ID:	1066575

      This works with minor problem. When making camera too much up or down, it goes crazy. Still working to find a way to make it stable.

      Comment


        #4
        Originally posted by Teodrus View Post
        @Raikoh i tried those things too (also my camera is a child of spring arm).

        With Lojo's advice from here https://answers.unrealengine.com/que...of-camera.html i set up my blueprint like this [ATTACH=CONFIG]25852[/ATTACH]

        This works with minor problem. When making camera too much up or down, it goes crazy. Still working to find a way to make it stable.
        Are you clamping the max and min?

        Comment


          #5
          In your character BP there is options in the Pawn section in the default tab, you can check the first person template aswell.

          Comment


            #6
            Originally posted by The Britain View Post
            Are you clamping the max and min?
            Yeah, didn't want to fish rotate all the way up, but deleted after this.

            Originally posted by Raikoh View Post
            In your character BP there is options in the Pawn section in the default tab, you can check the first person template aswell.
            First person template is using Camera (Parent) > Mesh (Child). This makes mesh move around camera so it isn't good for 3rd person gameplay.

            Comment


              #7
              It should work when you set the pawn to use controller rotation pitch and yaw in the pawn category inside the default tab.

              Comment

              Working...
              X