How to get object to face where the camera is facing

Hello,

I currently have objects that will rotate along the Z axis so that they are always looking AT the player, and they do not tilt for example if I were standing higher than the object.

But I don’t need the objects Facing the player, I need the objects to face in the same direction that the camera is facing. Right now the objects rotate as I move around in the world. I need them to rotate not when I’m moving, but when I change where I am facing. So even if I’m standing in place but I look left and then right, I need the object to rotate to the left and then the right.

Hey! So you want object to rotate to the same direction as the camera is looking?

  • On tick, you get player pawn, cast to your pawn, get camera and GetWorldRotation
  • Then SetActorRotation using that ^

Hopefully this helps, cheers! :slight_smile:

Thanks a lot! I had to add some other stuff to lock other axes from rotating but you had it perfect! Took me about 2 extra minutes after your help!
I’m posting the BP for it in case anyone else might want to do the same thing. This is perfect for recreating older games.
alt text

Np, glad it worked! :slight_smile: