Attention: Here be dragons
This is the
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Abstract base class for 2D game objects affected by physics.
PhysicsBody2D is an abstract base class for 2D game objects affected by physics. All 2D physics bodies inherit from it.
void add_collision_exception_with ( Node body )
Adds a body to the list of bodies that this body can't collide with.
PhysicsBody2D get_collision_exceptions ( )
Returns an array of nodes that were added as collision exceptions for this body.
Returns a KinematicCollision2D, which contains information about the collision when stopped, or when touching another body along the motion.
true, the body does not move but the would-be collision information is given.
safe_margin is the extra margin used for collision recovery (see CharacterBody2D.safe_margin for more details).
true, any depenetration from the recovery phase is also reported as a collision; this is used e.g. by CharacterBody2D for improving floor detection during floor snapping.
void remove_collision_exception_with ( Node body )
Removes a body from the list of bodies that this body can't collide with.
Virtually sets the node's position, scale and rotation to that of the given Tr