How the Mass in T2DPhysicsComponent works?
by Aiyra · in Torque X 2D · 09/02/2009 (5:26 pm) · 3 replies
Hi all.
Do you guys can help me understand how the Mass in T2DPhysicsComponent works? Because I really don't see any results changing its value.
For example:
Using the TXB, I changed the InverseMass field of an object from 1 to 0.01, so the mass would be 100.
The InverseMass of the player object is 1.
But it didn't change anything. The player can push the object just like he could when its mass was 1.
Do you know a way to make this work?
Thanks.
Do you guys can help me understand how the Mass in T2DPhysicsComponent works? Because I really don't see any results changing its value.
For example:
Using the TXB, I changed the InverseMass field of an object from 1 to 0.01, so the mass would be 100.
The InverseMass of the player object is 1.
But it didn't change anything. The player can push the object just like he could when its mass was 1.
Do you know a way to make this work?
Thanks.
#2
I know that the smaller the number, the heavier the mass. That's why I set it to 0.01, to make that object heavier than the others, but it didn't change anything. I was expecting that it would make the player have more difficulty to push this object, but it didn't happen. The player can push the object with 0.01 of InverseMass as easy as an object with 1 of InverseMass.
I don't want to make immovable objects. What I'm trying to do is differents objects with differents masses, so the player will have more difficulty to push heavier objects.
Thanks.
09/03/2009 (3:50 pm)
Hi Henry, thanks for the reply.I know that the smaller the number, the heavier the mass. That's why I set it to 0.01, to make that object heavier than the others, but it didn't change anything. I was expecting that it would make the player have more difficulty to push this object, but it didn't happen. The player can push the object with 0.01 of InverseMass as easy as an object with 1 of InverseMass.
I don't want to make immovable objects. What I'm trying to do is differents objects with differents masses, so the player will have more difficulty to push heavier objects.
Thanks.
#3
09/03/2009 (4:43 pm)
I saw in a sample or in the TorqueX book where the mass of bullets were set to 10000. Perhaps you should set your player's mass to something like 500 as 1 and 0.01 are almost the same.
Torque 3D Owner Henry Shilling
Smokin Skull