character problems

yuriythebest

17-01-2008 14:49:14

how do I add a TriangleMeshShape for collisions to a character? - the collision shape is defined in the parameters which are string like so?:

mCharacter= mPhysScene->createCharacter("character",Vector3(0,130,0),"type: box, dimenions:1,2,1 ");


as opposed to a body:

mPhysScene->createActor("FakeFloor", new CubeShape(1000,2.1f,1000), Vector3(0,-0.05f,0), "static: yes");

where it's possible

question2: how do I view the collision shapes? Why isn't there an mCharacter->setCollisionShapeVisible(bool)?

betajaen

17-01-2008 15:03:30

You don't with Characters. You only get a box or a capsule.

"type: box, dimensions: 1 2 1"
"type: capsule, dimensions: 0.25 1 0 "

If you want to see your character and the rest of the Physics scene from a PhysX point of view, then you should look into setting up the remote debugger.

yuriythebest

17-01-2008 17:23:09

cool thanks!

BonD

20-01-2008 19:57:35

Why my Character is falling slower than other bodies? As far as I know every object has to fall with the same speed irrespectively of its mass.

The problem, however, is not the Character's mass, because I've tried to modify NxOgre, rebuilt with a new setMass() function, and tried out different masses but nothing changed.

Any idea?

betajaen

20-01-2008 20:28:24

Because Characters use kinematic actors which the gravity does not apply. I've wrote some code to mimic it, but formula isn't very good.