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/
