How to go back to free moving camera

Hi I’m trying to blend between a certain set in place camera and then on a key press go back to the free roaming spectator camera. I use this code to go to a free standing camera:

307497-moveto.png

However I don’t know how to go back to the free moving camera. Anyone have any ideas?

Ed

What is stopping you from calling the above again and providing another camera as the New View Target?

I cannot figure out how to reference the orginal camera.

[…]the free roaming spectator camera

How is this actor created?

  • placed in the level
  • a dedicated spectator spawned by the Game Mode
  • manually spawned run-time by another blueprint
  • some other way…

While proper reference is generally more flexible, you could opt for the following alternative:

The Player Controller knows the actor it’s looking through. Before switching the cameras, store the reference to the Player Controller’s current view target:

Next time you call Set View, feed it the previously stored reference.