Get a vector3 for 'transform.backward'

I am creating a plane at a point somewhere out in front of the camera, and I need the plane to be aligned parallel to the camera’s view plane, but facing towards the camera, not away.

For example in C#:

Plane newPlane = new Plane(Camera.mainCamera.transform.forward, aPointInView);

This creates the plane where I want it, and aligned parallel to the camera properly, but the plane’s normal faces away from the camera.

Is there an easy way to get the camera’s forward facing, and flip it? (Or any way to take transform.forward and make it ~ transform.backward …?)

1 Like

transform.forward * -1 is the inverse of transform.forward