Stupid distance formula question...

Started by
2 comments, last by Morgan 23 years, 11 months ago
I wrote a custom file format and loader a while back and decided to add collision detection crap to my engine, but I can''t remember how to do a distance formula in 3D! I was messing around with it a bit, but it''s been quite a while since I took a math course, can anybody jog my memory? I should need to find the distance between the points by x and y, then do I do it for y and z and combine the two some way, or do I use the x and y distance and then do some trig using that distance as the base of the triangle? Sorry, a bit tired, by x, y, and z, I am referring to the axis (for example, a normal distance equation solves the distance between two points on the x and y axis). Morgan
Advertisement
You''re gonna hit yourself when I say it''s just (x^2 + y^2 + z^2)^(1/2)
I knew I was a little too tired to be trying to figure it out right now! He he he! I do feel pretty stupid right now, so thanks! I''ll just go kick myself now

Morgan
It makes a hell of alot more sense this morning. Thanks.

Morgan

This topic is closed to new replies.

Advertisement