|
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
|
05-21-2008 09:15
Ok, lets say you have an avatar and an object and you know the position of each. The avatar is as positionA and the object is at positionB. How would you calculate the position of a point which is along the line between positionA and positionB and which is 2 meters from positionB. Assume that the distance between A and B is greater than 2 meters. All I need is that formula. Any takers? Here is a diagram, by the way: http://img391.imageshack.us/img391/8573/vectoral0.jpg
_____________________
imakehuddles.com/wordpress/
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
05-21-2008 09:27
vector C = B-A; // a vecotr that goes from A to B vector iC = llVecNorm(C); // Same as C, but only one meter long. vector D = B - 2*iC; // two meters short of B on vector from A to B Put it together and you get D = B - 2*( llVecNorm(B-A)); ...and you thought you would never need HS geometry in real life 
_____________________
So many monkeys, so little Shakespeare.
|
|
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
|
05-21-2008 09:30
From: Lee Ponzu vector C = B-A; // a vecotr that goes from A to B vector iC = llVecNorm(C); // Same as C, but only one meter long. vector D = B - 2*iC; // two meters short of B on vector from A to B Put it together and you get D = B - 2*( llVecNorm(B-A)); ...and you thought you would never need HS geometry in real life  Thanks for the quick answer! I'll give it a try in a little while.
_____________________
imakehuddles.com/wordpress/
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
05-21-2008 09:32
From: Lee Ponzu vector C = B-A; // a vecotr that goes from A to B vector iC = llVecNorm(C); // Same as C, but only one meter long. vector D = B - 2*iC; // two meters short of B on vector from A to B Put it together and you get D = B - 2*( llVecNorm(B-A)); ...and you thought you would never need HS geometry in real life  Ha! Wrong! The picture showed he was trying to solve for C, not D! Nice to see you posting again, Lee. 
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|