Result of a torque is independent from mass..

gugus

08-09-2007 16:57:42

Helo everybody.

When i apply a force to a body with 1000000 of mass , i have exactly the same result than when i apply it to a body with 1 of mass...
Is this result normal?

Dirso

08-09-2007 19:11:16

No, it's not!
Since F=a*m, if the mass (m) is bigger than the accelaration (a) is smaller.

Try to provide a piece of code, but it's totally wrong.
Dirso.

gugus

09-09-2007 10:29:42

that was what i was thinking.

Here is my first code

//nxOgre
World* mWorld = new World("FrameListener: Yes, log: none");

Scene* mScene = mWorld->createScene("Main", pSceneManager, "gravity: no, floor: yes");

Body* mBody = mScene->createBody("cube.mesh", new CubeShape(0.5f), Vector3(5,30,5), "Mass: 1000000, Static: No");
mBody->addForce(Ogre::Vector3(10000,0,0));


And my second:

//nxOgre
World* mWorld = new World("FrameListener: Yes, log: none");

Scene* mScene = mWorld->createScene("Main", pSceneManager, "gravity: no, floor: yes");

Body* mBody = mScene->createBody("cube.mesh", new CubeShape(0.5f), Vector3(5,30,5), "Mass: 1, Static: No");
mBody->addForce(Ogre::Vector3(10000,0,0));

betajaen

09-09-2007 10:54:05

I nearly missed this, and was going to talk about trying NxForceModes.


The mass of both bodies are actually the same and neither 1 or 10000.

I'll explain.

The parameters system splits up each parameter and processes them in the order of left to right. Your setting the mass first then setting it to not a static body. But the code to not set it to a static body is setting the mass to the default value (which is 10) and density to 0, thus overwriting your original mass value.

Remove the "Static: No", it'll work then. You won't need it anyway.

katzenjoghurt

09-09-2007 13:53:13

I'm so keen and use this topic for another question regarding mass...

NxOgre::Body *myBodyX04 = mScene->createBody("Kringel7.mesh",new NxOgre::CubeShape(40,40,40),Vector3(180,960.5,-790), "mass: 200");

NxOgre::Body *myBodyX05 = mScene->createBody("Kringel8.mesh",new NxOgre::CubeShape(10,10,10),Vector3(100,960.5,-700), "mass: 10");


... why are both objects falling down to the ground with the the exact same speed although the other one has 20x the mass and is much bigger? :(

betajaen

09-09-2007 13:58:37

Gravity is an acceleration not a force.

As per this Apollo 15 video

http://video.google.com/videoplay?docid ... 2259784994

katzenjoghurt

09-09-2007 14:15:42

Hi betajean. :D

Ahhh... I see. So it's all about air resistance. Ahum. Learned something new today.

Yet, one could argue if that's what you want in a physics simulation. A simulation of a vacuum.

So... of course now comes the question: What would I need to do to make things behave more ... like on earth? :P

gugus

09-09-2007 14:16:49

Thank you Betajaen!

katzenjoghurt:betajaen is right,the mass of the object doesn't change anything.Only the mass of the Earth count.

betajaen

09-09-2007 14:19:47

@kateznjoghurt

Every now and again you could adjust the damping with all of the actors in the air randomly to pretend to have some sort of air resistance. It's probably the quickest and least accurate way of doing it, but it'll make it more Earth like.

katzenjoghurt

09-09-2007 14:27:12

Awww... I see.
Just wondered as things behaved quite different in Opal/ODE.


Thank you, guys!!