Julio Jerez wrote:if you have only one particle, the function you show to apply forces is always valid, not problem there
now imagine, the particle is in contact with another particle in front.
in this case the force you calculate will no apply the acceleration that you want, because the mass matrix of the system, is a function of all the connected bodies. now imagine you has n Bodies in a row, now the acceleration is divine by N.
But this is what i want.
If i move against a light object, i push it and move slower.
If i move against a heavy object, the player max force can't overcome static friction, and i can't push it.
If i move into a cloud of monsters, they push me around, but is till have some control and can escape eventually.
Julio Jerez wrote:the result is that at best you get a system when an object like a feather can push a one ton body. or at worse the accelerations are so huge that it gets into the real of numerical Presidion and solve errors.
No, there is a max force in my code (hardcoded by mass * 400.0, I did not clamp torque, should be added as well).
By tweaking this it's possible to get some default behaviour probably good for an entire game.
But as always, keep max forces as small as possible.
However, don't wanna argue about this, also i did not use it for a real game.
There is also ongoing discussion about various player controller aproaches everywhere.
You would be the first to create one that makes everyone happy