Hello Dan,
I don't really see what your question has to do with OSG or I simply
don't understand the question.
Here's some interpretation:
You have two coordinate frames in 3d space.
Now you want a the second frame to be aligned to the first one.
Position only is easy. Construct a vector between the two positions and
normalize it.
Now multiply this vector with the desired distance and add it to the
first position.
But this won't bring you _behind_ the first. For this you have to take
the direction vector of the first plane and do the same trick as above:
Normalize it, and add it (negated) to the first position scaled by your
desired distance. This point will give you your second position.
I guess you will have to adapt the seconds orientation as well.
A general advice though:
Before you start building a flight simulator you should really learn the
maths in 3d in order to understand OSG and the simulation stuff.
cheers
Sebastian
Hi,
I am making a very simple flight simulator and have a plane location and a
second chase plane location
I do not want the chase plane to get too close to the target plane.
I also do not want it to get too far away from the target plane.
How do I extend a line in 3D space? If I can extend the points below I can
always have the chase plane a fixed distance behind
targetPos = 3, 3, 3 * trailPos = 6, 7, 3
Thank you for help to a simple question
Dan
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49758#49758
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org