What I meant was:
use the example you allready used as a starting point.
Try to move the ray to another position for starters...like the nose
of the tank.
then add another instance of this routine to simulate another ray at
yet another direction.
From this you get 3 (or more) points in space which can be seen as
the edges of a plane...
so...with that you could build a vectro running from point a to point
b and hence you can calculate the amount of rotation around each of
the axis...
hm...I think maybe it's easier to write some pseudo-code to explain
what I mean...but that unfortunately will have to wait a bit until I
got some more time.
Sorry!
Best regards,
Markus.
Am 25.04.2005 um 12:27 schrieb Tristan McMillan:
Hi Markus
The terrain algorithm that you speak is there any literature
available.
As if I could get the height of the terrain at each corner of the tank
then I could generate the pitch and roll.I found that if you integrate
OSG with a terrain from VTterrain, then vtterrain has methods like
getTerrainHeight etc.
But if you are using a .osg, .flt or .ive model, like JoeDirt.flt, how
can you get the height at the position you require?
I tried using a ray, however my knowledge is limit in this area and
thus
my tank implementation failed horribly.
On Wed, 2007-04-25 at 12:05 +0200, Markus Stöbe wrote:
What I would suggest is using the terrain following algorithm for
every corner/every wheel of the Tank...well...at least 3 points need
to be measuerred.
after that you can more or less easily calculate pitch and roll of
the tank as a whole unit.
Best regards,
Markus.
Am 25.04.2005 um 11:58 schrieb Tristan McMillan:
Hi OSG-Community
I'm trying to make a tank follow the terrain. I have had a look
at the
NPS tutorial which uses the intersectVisitor method to find the
height
on the terrain.
However I need to get the tank to pitch and roll according to the
terrain, and I'm not sure how to go about doing this.
Does anyone have any ideas?
Regards
Tristan
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
--
Dipl.-Inform. Markus Stöbe
Gruppenleiter "Simulatoren"
Deutsches Zentrum für Luft- und Raumfahrt e.V.
in der Helmholtz-Gemeinschaft
Institut für Verkehrsführung und Fahrzeugsteuerung
Lilienthalplatz 7
38108 Braunschweig
http://www.dlr.de/fs
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/