Johannes Scholz wrote:
Hey guys,

I am currently integrating rigid body physics using osgBullet into our VR 
environment, which is mainly used for viewing CAD models generated in CATIA V5.

Well, I got everything running using a separate physics thread and the 
osgwTools::AbsoluteModelTransform like shown in the examples.

Now there are two problems I encountered:

First:
I added some code to switch on/off physics for my nodes on runtime. Well, that 
works fine up to the point I switch on the stereo mode.

In the demo scene on the screenshot I activated physics for the turbine, but 
then the eye separation gets mixed up. Compare left hand side with disabled 
physics and right hand side with enabled physics (on turbine hull only).

Now I already got it has something to do with the absolute_rf setting, because 
when using a simple matrixtransform instead, everything is fine is stereo mode.

The AbsoluteModelTransform should just "reset the model stack" and apply itself directly to the view, ignoring any parent model transforms. This allows physics to entirely control the object's world location. If you don't have any parent model transforms, then you have no need for the AbsoluteModelTransform and you can just use a MatrixTransform instead.

As Doug suggested, please take this to the Google group. Although I'm not sure how much help you'll get there, unless you can post a small reproducer code. Perhaps you could submit a patch?

Second:
Currently I use ConvexTriMeshs as CollisionShapes, but I'd rather use the TriMeshCollisionShape. But when I replace
btCollisionShape* cs = osgbBullet::btConvexTriMeshCollisionShapeFromOSG( node );

with

btCollisionShape* cs = osgbBullet::btTriMeshCollisionShapeFromOSG( node );
and then enable physics, simply no collision is detected at all. All objects 
simply fall through the ground in my demo scene.

That would be a good topic of discussion for the Bullet forum, as I doubt it has anything to do with OSG or osgBullet.

--
  -Paul Martz      Skew Matrix Software
                   http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to