x


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);

more ▼

asked Dec 02 '09 at 11:21 AM

torg gravatar image

torg
97 3 3 7

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Dec 02 '09 at 11:28 AM

duck gravatar image

duck ♦♦
41k 92 148 415

(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Dec 02 '09 at 11:28 AM

jonas echterhoff gravatar image

jonas echterhoff ♦♦
9.8k 7 23 104

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2091
x1679
x28

asked: Dec 02 '09 at 11:21 AM

Seen: 4027 times

Last Updated: Dec 02 '09 at 01:08 PM