enum CP::Body::Type

Defined in:

chipmunk/body.cr

Enum Members

DYNAMIC = 0

A dynamic body is one that is affected by gravity, forces, and collisions. This is the default body type.

KINEMATIC = 1

A kinematic body is an infinite mass, user controlled body that is not affected by gravity, forces or collisions. Instead the body only moves based on its velocity. Dynamic bodies collide normally with kinematic bodies, though the kinematic body will be unaffected. Collisions between two kinematic bodies, or a kinematic body and a static body produce collision callbacks, but no collision response.

STATIC = 2

A static body is a body that never (or rarely) moves. If you move a static body, you must call one of the Space reindex functions. Chipmunk uses this information to optimize the collision detection. Static bodies do not produce collision callbacks when colliding with other static bodies.

Instance Method Summary

Instance Method Detail

def dynamic? #

[View source]
def kinematic? #

[View source]
def static? #

[View source]