Changing cameras without using the Pawn camera...camera manager?

I have 3 actors that are animated. Each actor also has a camera. I need to be able to jump from one camera to another and be able to rotate those cameras about the actor it’s attached to. I don’t need to free roam the cameras, but I do need to rotate them. I’m trying to do this all through blueprints, but I’m not opposed to going to C++ if I have to.

I have data streaming into a pawn and that data being assigned to each actor for motion. Not sure if that’s the best way to do it, but it’s how it works right now. If I try to set the actors up as pawns and possess them, my data stream on the original pawn stops. Therefore, I’m streaming into a single pawn and using actors for everything else.

I’ve looked at the Camera Manager, but there’s little to now decent explanation of how it works.

Hey @anonymous_user_7c519203!

Are you attempting to control the character with the cameras? Or are you intending for this to work sort of like a security system? Like switching to one camera, rotate it to get a specific view, switch to a different camera and do the same, etc?

If you can give a bit more of a concrete idea of what mechanic you are looking for specifically, I am sure there will be a blueprint solution that will give you what you are looking for.

1 Like

So if you think of it like having 3 cars on a race track. All the data is coming from a simulation. The data gets sent out to the 3 cars (each a separate actor). I’d like to be able to go from an overhead shot that sees all 3 cars. Then choose a car and be looking through a camera that’s attached to the outside of the car, but allows you to rotate around the car while it’s moving. I’m also streaming data that I have on a HUD widget that I want to stay visible every time I change to a new camera. I’d like to change to the other cars as I’d like. Hopefully that makes more sense?

My trouble is that if I use pawns for the cars instead of actors, each time I possess one, for some reason, it stops streaming data to the all the cars. Since I’m driving the cars with data, I think the only pawn I’d really need may be the camera? If I make a camera on each car, I’m not sure I can use the blend properly and still keep my widget blueprint. I think I need to use the camera manager to make a camera, but switching with the camera manager is a thing of mystery to me.

1 Like

Hey, @anonymous_user_7c519203!

I think I understand what you are going for. One way to do so would be to open up your level blueprint and create references of your actors (by selecting them in scene then right clicking as if to create a new node in your blueprint graph). If you overlay the camera actor over the car that just moves the camera, but does not possess the car itself.

  1. Create references to your actors, I used the cars themselves but you would use the camera with the character controller. (make sure to disable auto possess player on the actors you do not want to start with)
  2. Drag off of those references and add the "Get Player Controller’ node
  3. Drag ogg of that node and add the “Possess” node

From there you would just need to use a spring arm component and set up a camera that rotates around each “character”.

Here is an example of using the possess node to possess three different cars in the same level when you want to:
UE4Editor_kGPxrI21gf
HgP1AuReZZ

UE4Editor_cmII3QMlXG

I hope this helps point in the right direction!

1 Like

this?

2 Likes

That may work, but how do you do that if you’re spawning new cars and a reference up front is not possible? So you have 3 cars and then #4 shows up because it’s a variation on the simulation? If it’s spawned is there a way to create a reference at spawn time?

Hi @anonymous_user_7c519203!

If you are spawning pawns then your method will be different. Fortunately, there is a question very similar to this one that has already been answered! If you follow this thread they explain the process of creating a possessable array of pawns that are spawned at runtime:

In Level Blueprint, how to create references to Actors spawned at runtime?

I hope this bridges the gap of what you need!