• ### What is your GameDev Story?

#### Archived

This topic is now archived and is closed to further replies.

# How to caluculate normal of plane

This topic is 6198 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How do I calculate the normal of a plane on the xz axiis that is centered at the origin, like a floor for instance? Is it just (0, 1, 0)? thx

##### Share on other sites
Plane:lane(Vector3 p0, Vector3 p1, Vector3 p2)
{
Vector3 edge0 = p1 - p0;
Vector3 edge1 = p2 - p0;

_normal = edge0.cross(edge1);
_normal.normalize();

_signedDistance = -_normal.dot(p0);
}

ECKILLER

##### Share on other sites
A flat plane, parallel to the plane xz, has a normal vector N( 0, 1, 0 )

Death of one is a tragedy, death of a million is just a statistic.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 11
• 9
• 9
• 40
• ### Forum Statistics

• Total Topics
634130
• Total Posts
3015704
×