Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: Not Selected
more ▼

asked Mar 12 '15 at 11:46 PM in Blueprint Scripting

avatar image

121 19 32 41

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Mar 13 '15 at 03:17 AM

avatar image

3.4k 154 52 271

(comments are locked)
10|2000 characters needed characters left
Viewable by all users


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. alt text

Level Blueprint and Scene

more ▼

answered Jan 08 '16 at 12:09 AM

avatar image

1 1

avatar image maggotcakes Mar 15 '18 at 08:53 PM

I kind of have this setup... but I used 2 blueprints... one with a camera inside... Now I don't know how to have that camera be my main camera when you play the game.

does the camera have to be outside of a blueprint to use it as the main camera? and does the logic have to be in the level BP?

if so I'll have to redo it.

avatar image maggotcakes Mar 15 '18 at 08:58 PM

ok... well I just made a camera actor in the viewport and attatched it to the BP with the follow logic in the outliner then set auto player activation to 0 in the details panel. This works but I would still like to know if there is a way to set camera that is located within a blueprint.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question