Download

Third Person with Camera Independent of Character

Hopefully this makes sense. Basically what I want to achieve is having my character move with the WASD keys within a 3D environment, while the mouse manipulates the camera, always rotating around a central point (using a spring arm) that isn’t the player. Any thoughts on how to begin going about this? Thanks.

I have done something similar. I have a vehicle pawn and the default camera position is in the drivers seat. But, if I hit key 5 I swap to a fixed position on the ground for the camera view (which, in my case actually tracks the vehicle - but that doesn’t matter). Create two variables - A vector called ‘CameraPosition’ and a rotator called ‘CameraRotation’ and create a boolean called ‘FixedCameraSelected?’. Now, when you hit key 5 (for example), you set the FixedCameraSelected to true. You then use the tick event to ‘SetWorldLocationAndRotation’ if FixedCameraSelected is true. Your mouse input can be used to update the CameraRotation variable.
When you want to return to using the original camera that follows the character press a key (number 1 in my case) and use this key press event to set the boolean to false and set the relative location and rotation to be relative to your character.
Alternatively you can add a second camera to your character and swap between which camera you have active (again, using key input).
So, basically you can have one camera and change its position or you can have two cameras and swap between them. If you just concentrate on getting two alternative views that you can change between to begin with and then worry about the mouse input later.
have fun!
Podge.