What the infinite_inertia parameter do in move_and_slide?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By arthurZ

Hi, I’m testing move_and_slide and move_and_slide_with_snapwith KinematicBody 2D in Godot 3.1-beta 3, and in the documentation there is no explanation of what the’infinite_inertia parameter do. Anyone know what that means? Thanks.

The link for the move_and_slide docs:
http://docs.godotengine.org/uk/latest/classes/class_kinematicbody2d.html

:bust_in_silhouette: Reply From: RenenerG

Maybe this article about inertia with physic objects helps

"Inertia is the resistance, of any physical object, to any change in its velocity. This includes changes to the object’s speed, or direction of motion. "

:bust_in_silhouette: Reply From: skysphr

infinite_inertia dictates the way a KinematicBody2D will interact with rigid bodies; if infinite_inertia is enabled (which is the default), the kinematic body will push rigid bodies away disregarding their own physics properties as if its mass were infinite. Note this might cause cause unrealistic behaviour when rigid bodies are squeezed against walls or pushed against multiple other rigid bodies.

This is the first Google / Duckduckgo result for “infinite_inertia” related to Godot, and since the previous answer does not fully cover the topic I thought it might be convenient to add a more detailed answer.