Jump to content
  • Advertisement

Archived

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

Angles and 3d lines

This topic is 6613 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

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

Share this post


Link to post
Share on other sites
Advertisement
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

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!