I can't find a complete example! shortguide? no!

kidcdf

17-01-2008 06:01:50

www.nxogre.org/shortguid is terribly short!

now I have written these codes:

create scene and object:
********************
m_nxworld = new World("log: text, framelistener: yes");
m_nxscene = m_nxworld->createScene("PhysxScene", m_sceneMgr, "Gravity: yes, floor: yes");
actor1=m_nxscene->CreateActor("car1",new CubeShape(1.0f),Vector3(0,0,0),"mass: 1");

Ogre frame_start()
****************
if(m_keyboard->isKeyDown(KC_UP)) //forward
actor1->addForce(Vector3(0,0,1));

******
is that all???

I have already had a ogre entity which loaded the "car.mesh",how can I combine my car with actor1?

fzh

17-01-2008 06:06:23

if you want visualization you should use body class. Although you could also set the position of the entity to that of your actor every frame manually.

betajaen

17-01-2008 10:58:28

Fzh is right, you use a body class if you want visualisation. However he/she is wrong on the second part, NxOgre does that for you.

kidcdf

17-01-2008 11:03:03

Fzh is right, you use a body class if you want visualisation. However he/she is wrong on the second part, NxOgre does that for you.
do you have any API manual? or other little example src,I strongly recommand you to combine these things into your SDK,that would be more useful than shortguide and attract more people

betajaen

17-01-2008 11:04:43

The shortguide and Cake are what we have at the moment and of course the PhysX documentation.

But to be fair that's more than some wrappers (I won't name names) have.

kidcdf

17-01-2008 12:25:00

The shortguide and Cake are what we have at the moment and of course the PhysX documentation.

But to be fair that's more than some wrappers (I won't name names) have.

Execuse me,what and where is cake?

kidcdf

17-01-2008 12:31:53

now I changed actor to the body:

m_nxworld = new World("log: text, framelistener: yes");
m_nxscene = m_nxworld->createScene("PhysxScene", m_sceneMgr, "Gravity: yes, floor: yes");


car.Body=this->m_nxscene->createBody(car.Modelname, new NxOgre::CubeShape(1.0f), car.Node->getPosition(), "mass: 1");

car.Body->addForce(0,0,10);

**************
it still stopped there....

betajaen

17-01-2008 12:35:57

Cake is the short but massive application which you see in the screenshots and you can do anything with. It's in one of the sticky threads.

What do you mean stopped there? The car won't move?

kidcdf

17-01-2008 12:37:49

Cake is the short but massive application which you see in the screenshots and you can do anything with. It's in one of the sticky threads.

What do you mean stopped there? The car won't move?

yeah,do you sure that I needn't bind body to ogre::entity or add something like m_nxscene->render() in each frame?

kidcdf

17-01-2008 12:43:14

I would appreciate u so much if you can provide a short example,just drive my poor car..

betajaen

17-01-2008 12:48:23

Just play with Cake for a bit, and no you don't call render automatically.

kidcdf

17-01-2008 13:15:25

Just play with Cake for a bit, and no you don't call render automatically.
where is cake's url

betajaen

17-01-2008 13:47:01

Couldn't you find the massive sticky thread of this forum?

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=4867