Announcement

Collapse
No announcement yet.

Camera rotation not working

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

    Camera rotation not working

    Hi! I'm making a game with an RTS-style camera and I can't seem to get the camera to rotate. I can move it around, and in the transform section of details I can see the rotation values change, but the camera won't point anywhere but right in front of it. Here is my blueprint for moving around, which works:
    Click image for larger version

Name:	move.jpg
Views:	1
Size:	260.7 KB
ID:	1135326

    And here is the rotation blueprint, which changes the rotation values but doesn't make the camera rotate:
    Click image for larger version

Name:	rotate.jpg
Views:	1
Size:	209.6 KB
ID:	1135327

    And finally, here are the values and how the screen looks, it doesn't rotate at all despite the rotation values changing:
    Click image for larger version

Name:	level.jpg
Views:	1
Size:	627.2 KB
ID:	1135328

    Any help would be greatly appreciated! And if you need more information, please tell me! This is my first time posting on any dev forum and first time working on a game in UE4, so I'm not sure what information to provide.

    Thanks!

    #2
    Looks like you are trying to rotate the pawn not the camera attached to it?

    If you are using the top down template as a basis, there is the pawn but you need to grab the springarm (which in turn has the camera mounted to it) within said pawn and adjust it's settings rather than the pawn itself, use get controlled pawn then get the spring arm details (rotation/distanced etc) then use set to change these with the Mouse Y movements. I have this exact set up for just zooming in and out. I am at work at the moment but can post the blue print later if it will help you.

    Comment


      #3
      Originally posted by Ghiest View Post
      Looks like you are trying to rotate the pawn not the camera attached to it?
      I agree that this seems to be the reason.

      Change your actor to a square to quickly test if this is the case. You can see the square rotating if it is so.
      Easy weapons in Unreal Engine 4:
      Check out Realistic Blueprint Weapons

      Currently doing a tutorial series on Vectors and what they are good for.
      Please visit Unreal Unscripted

      Comment


        #4
        Hi, thanks guys! You were right, what a silly mistake by me. Managed to make it work with just changing "Get Actor Rotation" and "Get Player Pawn" to "Get Control Rotation" and "Get Player Controller".

        Thanks!

        Comment

        Working...
        X