Announcement

Collapse
No announcement yet.

Camera to follow actor but not rotate.

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

  • Camera to follow actor but not rotate.

    Hey all!

    I want to make a top down shooter

    I have a camera that right now follows the character whever he moves but also looks in the direction of where im moving the mouse. Im struggling with making the character rotation independant of the camera.

    I just want the camera to be floating overhead and the character to be able to move freely and rotate freely based on the mouse position.

    this is my blueprint so far of basic player movement and look input:

    Click image for larger version

Name:	Untitled.jpg
Views:	1
Size:	144.4 KB
ID:	1385771

    Any ideas on what i can do to get it working as intended?
    Thanks!
    Looking for Level Design work https://tsayed.artstation.com/

  • #2
    If you are using a Spring Arm to connect the camera to the character, make sure you uncheck Inherit Pitch, Inherit Roll, Inherit Yaw in the properties of the Spring Arm.
    Visit us at http://humanxr.com

    Comment


    • #3
      Originally posted by vr_marco View Post
      If you are using a Spring Arm to connect the camera to the character, make sure you uncheck Inherit Pitch, Inherit Roll, Inherit Yaw in the properties of the Spring Arm.
      That still doesnt seem to work, cant even turn the character anymore.
      these are my spring arm settings:
      Click image for larger version

Name:	Untitled.png
Views:	1
Size:	42.1 KB
ID:	1386296
      Looking for Level Design work https://tsayed.artstation.com/

      Comment


      • #4
        Strange. How did you setup your character? The Spring Arm should not affect the movement of your character, only that of the camera which is parented to it.
        Visit us at http://humanxr.com

        Comment


        • #5
          Originally posted by vr_marco View Post
          Strange. How did you setup your character? The Spring Arm should not affect the movement of your character, only that of the camera which is parented to it.
          This is literally my setup now.

          Click image for larger version  Name:	Untitled.png Views:	1 Size:	192.0 KB ID:	1386373

          character can move and look around however the camera still follows the location of the mouse, I just want the character to rotate to mouse position and the camera to follow the character in a fixed overhead position.

          EDIT: I had to check "Use Pawn Control Rotation" or the camera would do some weird rotation above the character
          Looking for Level Design work https://tsayed.artstation.com/

          Comment


          • #6
            I don't think you need the LookPitch input and rotation. That doesn't belong to a top-down game and it is very likely causing you some issues. LookYaw is ok though, that is what makes your character turn in place. Since the SpringArm is not following the Yaw Rotation, the camera is not supposed to rotate with the character.
            Visit us at http://humanxr.com

            Comment


            • #7
              Originally posted by vr_marco View Post
              I don't think you need the LookPitch input and rotation. That doesn't belong to a top-down game and it is very likely causing you some issues. LookYaw is ok though, that is what makes your character turn in place. Since the SpringArm is not following the Yaw Rotation, the camera is not supposed to rotate with the character.
              You're right i dont need that but the camera is still rotating :/
              Do you think the animation blueprint could affect rotation of the camera?

              Click image for larger version

Name:	Untitled.png
Views:	1
Size:	108.6 KB
ID:	1386401
              Last edited by KingSpud; 11-15-2017, 12:03 PM.
              Looking for Level Design work https://tsayed.artstation.com/

              Comment


              • #8
                I don't think so, unless you have root motion animations. Can you show how your character (pawn) is setup?
                Visit us at http://humanxr.com

                Comment


                • #9
                  Originally posted by vr_marco View Post
                  I don't think so, unless you have root motion animations. Can you show how your character (pawn) is setup?
                  Im using the animations from the Anim Starter Pack.

                  these are the components attached to my character BP (if thats what you mean)
                  Attached Files
                  Looking for Level Design work https://tsayed.artstation.com/

                  Comment

                  Working...
                  X