Announcement

Collapse
No announcement yet.

Camera not rotating

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

    Camera not rotating

    Hey Guys! I'm quite new to unreal engine, so trying my hand at some blueprint stuff. I've implemented an RTS camera which moves well with the WASD controls and also zooms in and out quite nicely. But its not rotating at all on pressing the RMB and moving the mouse around. This is how I've implemented the rotation part:

    RTSCamera event graph :

    Click image for larger version

Name:	CameraRotationControl.png
Views:	1
Size:	301.0 KB
ID:	1138143

    UpdateCameraLocation&Rotation function used in case you want to have a look:

    Click image for larger version

Name:	UpdateFunction.png
Views:	1
Size:	175.3 KB
ID:	1138145

    Controller event graph :

    Click image for larger version

Name:	InputController.png
Views:	1
Size:	175.2 KB
ID:	1138144

    I know i'm missing out something here, maybe in the way I set my booleans to detect the right mouse click.
    When I debug the axis values. It shows the negative and positive values depending on the direction. But the camera won't move.

    Please Help. Thank You
    Last edited by Amaresh; 09-06-2014, 07:41 AM.

    #2
    With you following my RTS Style Camera Movement tutorial I would suggest you go over page 4 again. Everything I show regarding movement happens in the Pawn blueprint. However if you require these actions to be in the playercontroller I would suggest double checking the "CameraPawn" variable you have. Chances are its not the correct reference for the controlled pawn.

    If need be you should change it to "Get Controlled Pawn" that way it'll get the pawn that the controller is controlling. This will ensure that its targeting the correct pawn and send over the information.
    Looking for blueprint tutorials? Then visit my blog... voxagon

    Comment


      #3
      Originally posted by pattym View Post
      With you following my RTS Style Camera Movement tutorial I would suggest you go over page 4 again. Everything I show regarding movement happens in the Pawn blueprint. However if you require these actions to be in the playercontroller I would suggest double checking the "CameraPawn" variable you have. Chances are its not the correct reference for the controlled pawn.

      If need be you should change it to "Get Controlled Pawn" that way it'll get the pawn that the controller is controlling. This will ensure that its targeting the correct pawn and send over the information.
      But I'm using the same camera reference for the movement and zooming part and they both work just fine. And The Rotation part in the RTSCamera blueprint is getting executed whenever I press the RMB. But its not moving.
      Last edited by Amaresh; 09-08-2014, 09:20 AM.

      Comment

      Working...
      X