How do I reference an actor component camera to use as my main camera?

I’m trying to take on the viewpoint of my car actor by using a camera component in side my car actor.
However referencing components of an actor is not compatible with the function “Set View Target with Blend”, is there still a way to reference it?

This is kind of a spin off question from this link (actor camera as main camera)

Thanks in advance

2 Likes

If your camera is a camera component, you maybe have to send that to a “get owner” node and then send that to the New View Target node.

How would I use the Get Owner function?
I have ‘top_assembly’ which is my actor, and the camera is its component.
Which part do I assign to Get Owner?

I’ve been making a CameraActor Blueprint and doing what you’re trying to do in there. The New View Target tends wants an Actor and not just the camera component…which is why I’ve had to link the Camera Component to the “Get Owner” and then go into SetViewTargetwithBlend.

I Spawn that CameraActor inside my Character Blueprint (can also be done with an Actor Blueprint)

2 Likes

Alright, I actually found my solution. You can directly input your actor into Set View Target with Blend and it will automatically use the camera component in your actor as the main camera.
You actually don’t need to reference the camera component specifically in the blueprint editor.

What if i have two (or more) cameras in my BP and want to switch between them? since set viwe camera with blend takes the first active camera in the bp, i can’t figure out a way to switch between cam1 and cam2. can you help me? thanks!

I have another one. Try to link the camera component inside a rig rail camera. You can see the camera moving along the rail spline cause now the rail itself is the new camera which is static.

This is great! The Get Owner node is what I was missing. :slight_smile:

Kind of late, but you would just need to use a set active function (target actor component) and set the new camera as active and the old camera to reset, and also use the built in set Use Controller rotation yaw. Oh and youll need a way to iterate between the two, which you can use a flip flop function.

Have you tried looking into FlipFlop? That would save you from having everything up to the branch