- Home /
Answer by senad · Feb 14, 2012 at 08:58 AM
You can set up a plane orthogonal to the camera viewing direction in the same distance as the cube. Then you can make ray casts through the four corners of your view plane to find the corresponding four points in world space.
Then you can use those four points to adapt your cube geometry. The details depend on which parts of the cube you want to align with the view plane.
Would you need another plane as a huge collider to make the raycasts?
But you do not need a mesh plane. See the documentation on Plane [http://unity3d.com/support/documentation/ScriptReference/Plane.html], which can do Raycasts by itself and is infinitely sized.