Riyunoa
25-01-2007 08:01:58
So far I've seen some code written, but I don't understand how the Scene and World stuff links with Ogre's SceneManager etc. Is a Body a SceneNode, and a Scene, a SceneManager?
If I already have some stuff working in my game and I want to integrate nxOgre for physics, where do I start? More importantly, do I have to convert my SceneNodes to Bodies?
And could someone
please link me to the nxOgre documentation, I would like to see an inheritance tree, I can't seem to find it anywhere.
Thanks!
betajaen
25-01-2007 10:39:54
Summing it up quickly.
The body class is a SceneNode and a PhysX NxActor, which automatically updates the coordinates of the NxActor to the SceneNode automatically for you. World is partly a framelistener so you don't have to call some simulate function like other Physics wrappers, and Scene is like bit a SceneManager but for Physics. However you can have more than one Scene and they can share SceneManagers or not.
As for documentation there are around ~40 tutorials, these are separate vcprojects that teach you different features of NxOgre. Not only that we have the
wiki which should be some use.
As for directly answering your questions:
1. Body is partly a SceneNode.
2. Scene contains many bodies, like a SceneManager contains many SceneNodes. Which the world contains the Scenes.
3. As for converting your SceneNodes to bodies. The body class will do it for you. For example if you wanted to accurately model some wooden crates, and you had a system in place that did it for you, which did everything; loaded them up and positioned them in the world. A body can use it's SceneNode, however it's just as easy to replace that system with just a body. It's much easier on the mind
4. No inheritence tree as such, but we have a
book!
However after looking through the first few tutorials you'll pick it up very quickly. Most people do.
Riyunoa
26-01-2007 06:49:07
EDIT:Nevermind, fixed, turned out my error was caused by not installing the PhysX drivers.
Thanks beta, the explanation was very useful!!