Hi Robert,

sorry for the slow reply as I was away.

I'm currently using 2.0
I'll download and install 2.2 in that case.

Thanks!

Regards
Weng Heng


> Date: Wed, 7 Nov 2007 09:08:10 +0000
> From: "Robert Osfield" <[EMAIL PROTECTED]>
> Subject: Re: [osg-users] Tank Traversing across terrain
> To: "OpenSceneGraph Users"
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Weng,
>
> I believe I enabled intersection testing for GeometryTechnique for
> 2.2, but can't recall the precise details. Which version are you
> using?
>
> Robert.
>
> On Nov 7, 2007 3:56 AM, weng heng sze tho <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm trying to make a tank move across a terrain.
> >
> > The terrain is created by reading the image files of Puget Sound that i
> > downloaded from http://www.cc.gatech.edu/projects/large_models/ps.html
> > as mentioned in the quick step-by-step guide for OsgDem. Then I
> > setElevationLayer and setColorLayer to an instance of
> > osgTerrain::TerrainNode. The terrain seems to display fine.
> >
> > I added a "tank" node and attached it to a PositionAttitudeTransform. To
> > make the "tank" move, it is set to a callback whereby it sets the new
> > position of the tank to make it look like it is moving in a circle. The
> > callback needs to check the elevation of the terrain so that the tanks
> > "moves" according to terrain, so to do this I used the function
> > "computeTerrainIntersection" from the example osgparticleeffects. Problem
> > is, computeTerrainIntersection doesn't seem to be able to detect the
> > elevation. I stepped through this function and it seems that
> > osgUtil::IntersectVisitor doesn't seem to get any "hits". I did notice
> > however that if I build the terrain by setting its elevation using
> > osgHeightField as is used in the example osgparticleeffects, the elevation
> > can be detected just fine.
> >
> > How do I make the function "computeTerrainIntersection" return me the
> > correct elevetion?
> >
> > Thanks in advance for your help.
> >
> > Weng Heng
> > _______________________________________________
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to