adjusting the position of the SceneNode

Felipe

26-06-2007 23:38:45

How adjust to the position of the mesh of the OgreNewt::body ?


my code

ent = mSceneMgr->createEntity( name, "ninja.mesh" );

node = mSceneMgr->getRootSceneNode()->createChildSceneNode( name );

node->attachObject( ent );

body2 = new OgreNewt::Body( m_World, col );

body2->attachToNode( node );

walaber

27-06-2007 00:47:58

you want to "offset" the SceneNode from the body?

if so, make a child node and offset that.... like this:


ROOT NODE
- OBJECT NODE (Attached to rigid body)
-CHILD NODE (with Entity attached) <- offset this node.