Building a body out of many others?!?

spacegaier

10-03-2008 16:20:22

I want to build up my stadion (will be static) out of many smaller pieces. How should I structure the whole thing regarding Actors and Bodies?

Can I add several meshes to an actor and position them in this actor and give them shapes?

betajaen

10-03-2008 16:27:38

You can use many shapes (one mesh per shape) per Actor yes.

spacegaier

10-03-2008 16:34:32

But how can I attach the meshes?

actor = m_pNxScene->createActor("groundActor", NxOgre::SimpleShape(SST_Plane), NxOgre::Pose(pos), "static: yes");

betajaen

10-03-2008 16:53:43

No. Do you even try and compile the code you post?

Look up ShapeGroups and actor->addShape()

spacegaier

11-03-2008 14:56:01

Sorry, but I haven't got it yet :(

I need some more details/hints:

My stadion has to be build up out of a plane for the ground on which there will be two fences for the sides and two goals.

At the end of this building process I want to have one body with which my players and the ball can collide. That's what I want to reach.

Therefore you gave me the hint ShapeGroups but I don't know whether you mean the Container ShapeGroups or just several objects of the class ShapeGroup. In both cases I don't know what to do (or better how to structure it, in other words: where to attach the meshes and to whom...).

spacegaier

11-03-2008 19:37:14

A piece of code could also help :wink: