CLASS v1.8.0

physics.Collision

pykraken.physics.Collision

Information about a collision between two bodies.

More about physics.Collision

Collision events are generated during the physics step for colliders that have enable_events set to True. Retrieve them with World.get_collisions().

Reference

PYTHON API
physics.Collision(/, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

approach_speed: float

The speed at which the bodies approached each other.

body_a

property
body_a: physics.Body

The first body involved in the collision.

body_b

property
body_b: physics.Body

The second body involved in the collision.

normal

property
normal: Vec2

The normal vector of the collision.

point

property
point: Vec2

The point of impact in world coordinates.

Find your next step

Start typing to search the manual.