Advertisement

Angles and 3d lines

Started by April 13, 2000 08:53 PM
0 comments, last by Great Milenko 24 years, 8 months ago
ok I''m getting read to work on a 3d game and I was wondering how I could find the path of a line through 3d space. I was planning on using the angle off of the xy plane and xz plane to figure out how an object is facing then use a line to look ahead to see if theres anything in the way... I''m wondering what a formual for that would be.... Great Milenko

Words Of Wisdom:
"Never Stick A Pretzel In Your Butt It Might Break Off In There."


http://www.crosswinds.net/~milenko
http://www.crosswinds.net/~pirotech

The Great Milenko"Don't stick a pretzel up your ass, it might get stuck in there.""Computer Programming is findding the right wrench to hammer in the correct screw."
You have the normal of your object?
and is rotating it along with the object?
if not just make it 0,0,1 from the begining (or 0,1,0 if you are a 3ds freak )
if you have it your line will be starting from the objects position and extends in the normals direction
Ox,Oy,Oz = object position
nx,ny,nz = the normal
x=Ox + t(nx)
y=Oy + t(ny)
z=Oz + t(nz)
damn i´m bad on explaining things..but I hope this helps a bit

This topic is closed to new replies.

Advertisement