Download

Setting the player camera to look at a certain point

I want the player camera (in first person view) to instantly look at a certain point without the need of switching to other cameras. I searched for examples but only found how to make other objects look at the player position and it didn’t work the other way.

The immediate thing that comes to mind is manipulating the transform on the Camera component (or the Boom it might be attached to). Would simply setting the transform value not work? If that works, then I imagine there is some way to move the camera along a curve so it smooths out the transition.

To be clear:

  • On event (or wherever)
  • Make transform
  • Get camera component
  • Set transform on component

Seems to work with Set Control Rotation
ae9bb2de8497828883302caaa49313c1138abca3.png

I found it didn’t behave properly. Apparently player location comes from “player character” and rotation comes from “player controller”. It fixed it anyway.