Skip to main content
gamedev.net
🔒 Locked

problem

Started by TheVoid Apr 21, 2003 at 7:33 PM 5 replies 400+ views
Original Post
TheVoid
TheVoid
Here is a picture.
stevenmarky
stevenmarky
Please type up the problem? (I can hardly read your writing )

If I understand, half the problem is the same as your last one:
http://www.gamedev.net/community/forums/topic.asp?topic_id=152280
Zern
Zern
And I thought I had bad handwritting hehe..
TheVoid
TheVoid
I''m in the point (let it be K). Now I''m moving to the second point (let it be L). Now checking if the line KL intersected a triangle. So first I''m checking if the line KL intersected a plane that the triangle lies on. If it intersects, I''m searching for intersection point. I found (let it be M). So now I need to check if it is in the triangle. It is. So now I want to move KL back (in the reverse direction) by length of ML. So the L'' will be M, but I don''t know how to calculate K''. I can''t explain that more clearly. My english is too bad.
TheVoid
TheVoid
is my handwritting so bad?
grhodes_at_work
grhodes_at_work
Okay,

Here is my answer. You have points K, L, and M. The new points will be:

L'' = L - (L - M) = M
K'' = K - (L - M) = M + K - L

Try it, and it should work.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
TheVoid
TheVoid
thaks. that is exactly what I needed.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.