[EMAIL PROTECTED] wrote:
I am trying to have the tank following terrain in a simple application
following tutorial on NPS site.
The problem I have is that while tank moves with right height from terrain
trough an intersectVisitor I can't get it to follow terrain ondulation (
setAttitude )..
Is there a way to pass world normals to quaternion function ?

You can create a rotation matrix (using 'makeRotate') that rotates an up-vector (e.g. 0,0,1) to the normal you obtain from the terrain. From that matrix you can extract the quaternion to pass to the PositionAttitudeTransform.

/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to