Four points, one at each corner is the only way to make it move realistically as you have found. The downside is that you have four times the workload. Perhaps you could introduce some sort of LOD filter so that a single calculation is used for distant objects.......
PhilT -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Tristan McMillan Sent: 20 April 2007 15:18 To: osg users Subject: Re: [osg-users] IntersectVisitor Hi Oliver Your idea works however my tank still digs into the terrain now and then. I think its a result of sharp curvatures on my terrain at certain position. I was wondering if there is a more accurate method? I was thinking of having 4 points at each corner of the tank, which are checked for intersection. I've been hacking at this for a while with no success as of yet. I think the final ideal model will need to have some form of dynamics, eg take into account momentum, force and moments. But for now I'm just trying to get a relatively smooth motion in a graphical implementation. Thanks Tristan ----- Original Message ----- From: "Oliver Schoenborn" <[EMAIL PROTECTED]> To: "osg users" <[email protected]> Sent: Thursday, April 19, 2007 7:11 PM Subject: Re: [osg-users] IntersectVisitor > IIRC, you use the surface normal of the terrain to create a rotation > quaternion (easiest) or matrix (bit more involved) and apply it to the > object. > HTH, > Oliver > > Tristan McMillan wrote: >> Hi OSG Community >> >> I've been working with the NPS tutorial for the tank being situated at >> the height of the terrain. >> >> I've adapted this code to allow the tank to move and follow the terrain >> for a certain change in the tanks position. However, I can't seem to get >> the tank to roll and pitch according to the terrain profile. >> >> Has anyone accomplished this or does anyone know how to do this? >> >> thanks >> Tristan >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://openscenegraph.net/mailman/listinfo/osg-users >> http://www.openscenegraph.org/ >> > > > -- > Oliver > skype: schoenborno > > _______________________________________________ > 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/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
