- Home /
How to create a Plane from a normal and a distance?
static function Plane (inNormal : Vector3, d : float) : Plane
Simply, why does no Plane appear in the scene when I use the Plane constructor like:
var plane = Plane(inNormal, floatValue);
Answer by duck · Dec 02, 2009 at 11:28 AM
The "Plane" class represents a theoretical plane in 3d space, used for mathematical and geometric calculations - which is different from the Plane primitive found in the editor, which is a bit like a prefab GameObject with a Mesh Filter, Mesh Collider and Mesh renderer components attached.
If you want to create plane primitives at runtime, you'll need to use the Instantiate command, and supply a reference to an existing plane GameObject, or use the CreatePrimitive command.
There's also a "CreatePlane" script on the wiki, if you want to be able to specify the number of faces used in your plane.
Answer by jonas-echterhoff · Dec 02, 2009 at 11:28 AM
The Plane class does not represent a graphical objects - it's just a mathematical plane used for calculations -- which side of the plane an object is, where a ray intersects the plane, etc.
You can create a graphical plane mesh using the GameObject->Create New->Plane menu command.