BigBulle
30-07-2009 13:23:21
Hello everybody
,
I have a general question about physic system simulation more precisely I'm concern with static friction force.
I have a system composed by boxes linked by joints in a row. Each boxe can have a driving force or a braking force (braking force = static friction force).
I have a problem to set the braking force when the boxes are not moving.
For instance if my boxes are in a sloop, the braking forces must be equal to the one due to the gravity. How can I easily set my braking force.
I wonder also if there is a way to know the forces applied on the joints
I hope my problem is clear,
Thank you very much
,
BigBulle
LucaMoller
31-07-2009 06:11:02
/* I didn't understand exactly why you are setting the friction forces manually when Physx does it automatically.
Suposing your box system is over a surface, then you could just set the materials of the box and of this surface in the way you want so it produces your friction force automatically ( the physx materials lets you to set static and dynamic friction coeficients for collisions)
I hope this helps!
*/
EDIT: Oh, I see... your problem is not doing it but knowing how it's done... In that case you would need to know the force aplied to each box and see if its bigger than the maximum static friction force on that box, if it's not you just apply an oposite force of the same intesity, if it's bigger then you apply the static friction force in the opposite direction. I haven't seem yet a way of getting the force the joints are doing , but I'm dont know much about physx either ( you could have it from the last frame and try to use it on the next, but I think it's impossible to calculate it before considering the friction force and aceleration of the box and the system on its other side ).
You could do something like calculating a resulting force as the sum of the driving forces of all boxes. Then you consider all static friction force at maximum. So you make a simulation with this. I think that if the center of mass of all boxes moves in the direction of the resulting force or in a direction that dont make more the 90 degrees with it, you can consider the system will move somehow (but not necessarily all the friction forces will be maximum because not all boxes have to move), but if that doesnt happens I think you CAN'T state that the system won't move at all because again maybe just some of the boxes will move... I think this a hard problem indeed (we are not dealing with a rigid body)
BigBulle
06-08-2009 09:19:53
Thank you very much for your answer.
I knew that I didn't go in the right direction.
I simply have to change the material during the simulation to modify the static friction of my objects dynamically and then, NxOgre do the rest for me.
Thank you
BigBulle