Why are player controlled and ai controlled players effected differently by physics?

Why do AI controlled and movecontroller/motor players change their physics based on what is controlling them? For example, when I take control of a character with a free movement motor and player move controller, it will be able to push all of the other characters around in the game, even sending them flying, as if their masses have been cut down 95%.

Is there a solution to this?

Thank you very much for the help.

“it will be able to push all of the other characters around in the game, even sending them flying, as if their masses have been cut down 95%”.

It sounds as though your player object has a rigidbody set to “kinematic”. Kinematic objects affect other bodies, but are not affected by them. Thus a kinematic ping pong ball could send a non-kinematic Volkswagen into orbit without losing velocity, but the Volkswagen couldn’t budge the ping pong ball under any circumstances.

There is a proper way to structure any given physical scenario; this is a rather difficult concept to explain. The right set of parameters for a given scenario will vary. There are many rules and “best practices” when it comes to implementing PhysX in your game.

One of them is that, UYKEWYD (unless you know exactly what you’re doing), your “player controller” controlled characters should not have a rigidbodies. This is one of the very, very few situations in which a non-static object with a collider does not get a rigidbody. They should be able to collide with the environment and other bodies and characters, but not push them.

99% of the time you see a “push” behavior in a classic FPS or third person game with organic characters, you’re witnessing specially scripted behavior that occurs when the collider collides with another body. This code should be invoked in the character’s OnCollisionEnter method. The momentum of the impact is calculated and a relative force is applied manually to the other body (at the collision’s contact point) using the appropriate member of the AddForce family of methods.

It’s done this way because otherwise, the character would need to be kinematic (able to knock small German autos into space) or non-kinematic (affected directly by physics, thus he’d respond just like a crate or barrel when hit by a moving object. This would also spoil the purity of the physics simulation by moving the body about without using forces).

The big glaring exception to these rules is vehicles, which have a whole different set of considerations. Please post a comment if you have follow-up questions.