+3 votes

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:

in Engine by (172 points)

2 Answers

–1 vote

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. "

by (252 points)
0 votes

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.

by (1,259 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.