KinematicBodyCollision__safeMargin Property |
Extra margin used for collision recovery in motion functions (see MoveAndCollide(Vector3, Boolean, Boolean, Boolean), MoveAndSlide(Vector3, NullableVector3, Boolean, Int32, Single, Boolean), MoveAndSlideWithSnap(Vector3, Vector3, NullableVector3, Boolean, Int32, Single, Boolean)).
If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies.
Namespace: Godot