|
-
talk to the hand!
[F8] [HELP] point location problem!!
hi fk people, I know this is the game section but I love you guys .

I need to find the x,y of the red point
It's related to the main object, and it must be in the line between x_1 and x_2
any help
thnx in advance
-
So you are trying to find the closest point on a line to another point?
That can be done using either trig or coordinate geometry and a hint of algebra.
http://www.google.ca/search?q=findin...ient=firefox-a
The general idea is find the equation of a line perpendicular to x_1, x_2 passing through the point and find the intercept of the original and perpendicular line.
The greatest pleasure in life is doing what people say you cannot do.
- Walter Bagehot
The height of cleverness is to be able to conceal it.
- Francois de La Rochefoucauld
-
talk to the hand!
can you give me an as2 example I don't get that other lenguage
Edit:what is float?
Last edited by Never_land:(; 02-15-2008 at 11:59 PM.
-
you should make it more clear,- the current pic is not at all!
for instance wich red dot,- there are several
- are the orgins of the circle things 90° tangent to the line of x_1 to x_2?
-
I have this really old experiment (no source, unfortunately). Is it what you are going for?
http://www.sharemation.com/691175002...20circle2.swf?
Last edited by 691175002; 02-16-2008 at 03:21 AM.
The greatest pleasure in life is doing what people say you cannot do.
- Walter Bagehot
The height of cleverness is to be able to conceal it.
- Francois de La Rochefoucauld
-
talk to the hand!
 Originally Posted by 691175002
that's exactly what I am trying to do(except by the blue line moving)
can you please give me a file it will be very useful
I'm making this game that manages gravity points, I tried to make gravity lines but not accurate enough, well not as gravity points, and I thought It may be possible for a gravity point to go from one point to other in a way it turns into a very precise gravity line.
-
Script kiddie
He's trying to do this:
http://www.birchlabs.co.uk/MultipleVectors.swf
Ignoring the 'multiple' vectors, which overcomplicates things a lot, we essentially just make a vector going from the chosen line (this line also being a vector) to the character, and project this vector onto that line. The dot product of this tells us how far along the line we are (in the example shown, it's the green line).
To find out which side of the line we're on, we also project a vector of ourselves onto a line perpendicular to our line. The dot product of this gives us our blue line, which if positive says we're above the line, or if negative says we're below it.
All we need are these two dot products. Based on observations of these values, we can decide whether or not you are above or below the line, or whether you've gone past - or not reached - it. This is all the information we need to either rotate it to its startpoint, endpoint, or perpendicular to the line itself.
-
Script kiddie
-
talk to the hand!
thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|