Jump to content
  • Advertisement


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

Great Milenko

Angles and 3d lines

This topic is 6765 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."


Share this post

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!