How can I make a camera follow an ACTOR and NOT a character?
I have an object that can be possessed by multiple characters and so I want the camera to follow the OBJECT and NOT a controllable character. Any tips on how to do this?
asked Mar 12 '15 at 11:46 PM in Blueprint Scripting
Create a blueprint extended from Actor, add a spring arm and camera component to that. Now this blueprint will be the object your characters will pickup.
Now I suppose you only need to use this camera when it is actually picked up by one of your characters. So when the item is picked-up, use the 'Set View Target with Blend' node to change to the Actor's camera (you will need to get a reference to the camera component and pass it as input to the node)
But if you want to see through this camera all the time, do athe above stuff in the BeginPlay event of your Pickup Actor.
answered Mar 13 '15 at 03:17 AM
One way to follow an actor in the scene: use the Find Look at Rotation. It needs only two locations: the Camera Actor's location and the other ACTOR's location, which actor can be anything in the scene I think. With this rotator you just set the Camera Actors rotation at every Tick with Set Actor Rotation node.
You can replace the StaticMeshActor's reference node with a Variable type of Actor Reference, what can be reference to a scene object. So you can set the variable whenever you want.
I just used a cube what represents the camera in gameplay (Camera Actor's is not visible in game). I linked this cube to the Camera Actor. Look at Target was a StaticMeshActor in the FirstPersonExample Template. I was shooting the cube, it was falling down while the camera was following. After 5 seconds delay I changed the variable to the FPS Character, and the camera looked at me.
answered Jan 08 '16 at 12:09 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here