Cheers,
In my attempt to physically simulate a simple pedulum connected to the ground with a simple motor (not for a game but for robotics), I'm trying to improve on the friction box2d can simulate. As it seems, the only way to have a revolute joint have friction is to enable the motor and set a maximum torque, which is basically dry friction. Now, for a fluid friction component, it is easy to just take the current velocity times some constant and apply that torque against the current direction (even though that comes a step too late). My problem lies with static friction, i.e. a force dependent component which holds against a certain maximum torque while the velocity is zero. From what I have read so far, it seems not possible to determine the resultant force/torque on a body and even if, I would need to set impulse and velocity to 0 in the same time step the force occurs. What else can I do to simulate static friction that ideally does not introduce oscillations? (Overriding box2d methods seems a bit tricky but might be a way to go)
Thanks a lot,
Stefan
In my attempt to physically simulate a simple pedulum connected to the ground with a simple motor (not for a game but for robotics), I'm trying to improve on the friction box2d can simulate. As it seems, the only way to have a revolute joint have friction is to enable the motor and set a maximum torque, which is basically dry friction. Now, for a fluid friction component, it is easy to just take the current velocity times some constant and apply that torque against the current direction (even though that comes a step too late). My problem lies with static friction, i.e. a force dependent component which holds against a certain maximum torque while the velocity is zero. From what I have read so far, it seems not possible to determine the resultant force/torque on a body and even if, I would need to set impulse and velocity to 0 in the same time step the force occurs. What else can I do to simulate static friction that ideally does not introduce oscillations? (Overriding box2d methods seems a bit tricky but might be a way to go)
Thanks a lot,
Stefan