How do I get the direction the camera is facing.
This is for a first person shooter.
I am using the camera inside the puppet. I made the camera distance 0 and the puppet invisible to make it a first person camera.
How can I get the direction of the camera so I know what direction to shoot?
-
Press L1+X (if I'm not mistaken) and it will allow you to move the camera and see what it's facing.
-
Dude I mean in code so I can shoot a laser (raycast) in that direction
-
Try adding a Look At Rotator, then under its outputs tab, it has a Scene Space Direction. Alternately, you can add a RayCast Sensor to the microchip and position the origin at the head of the puppet, and guide lock the ray to cast in a forward vector.
Please sign in to leave a comment.