CLASS v1.8.0

physics.Collider

pykraken.physics.Collider

Non-owning collider handle. id supports matching and dictionary keys within a world's lifetime, including after collider destruction. Check is_valid before reading body. A concave polygon creates multiple collider handles.

Reference

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

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

body

property
body: physics.Body

No description supplied by the module.

id

property
id: int

No description supplied by the module.

is_valid

property
is_valid: bool

No description supplied by the module.

set_events_enabled(self, enabled: bool) -> None

Enable or disable hit, contact, and sensor events for this collider. Use this to opt in existing colliders, including CharacterBody's internal capsule. Changing CharacterBody.capsule_shape preserves its event flags but replaces its ID. Kinematic characters use mover queries against static terrain; these queries do not produce contact events. Use is_on_floor/is_on_wall for mover contact state.

Find your next step

Start typing to search the manual.