Jump to content
  • Advertisement


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


Plane Normals?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

My question is: How do I calculate a plane''s normal. I found a site on vectors, and I am going to start on collision detection. If thispost = 0 Then GoBack() Else Read() End If

Share this post

Link to post
Share on other sites

With 3 points that lies on the plane you can construct 2 vectors, with 2 vectors you just need to do cross product and that''s all.


With points a, b, c you build 2 vectors:

vector1 = a - b
vector2 = c - b

normal.x = vector1.y * vector2.z - vector1.z * vector2.y;
normal.y = vector1.z * vector2.x - vector1.x * vector2.z;
normal.z = vector1.x * vector2.y - vector1.y * vector2.x;

and that''s all.


Share this post

Link to post
Share on other sites
To clarify what Rambo said, by "points" he means "vectors"; to get the normal of a triangle, you''d use the three vertices of the triangle. Technically you could use any 3 points that lie along the plane of the triangle, but of course it''s simplest to use its vertices. Also note that the direction of the normal is relative to the order of the points - if they''re clockwise, the normal will point in the opposite direction than it would if they''re counterclockwise.

~CGameProgrammer( );

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!