CLASS v1.8.0

physics.CastHit

pykraken.physics.CastHit

Result of a ray cast or shape cast query.

More about physics.CastHit

Contains the body that was hit, the point and normal of the intersection, and the fraction along the cast path where the hit occurred.

Reference

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

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

body

property
body: physics.Body

The body that was hit.

fraction

property
fraction: float

The fraction along the cast path at which the hit occurred.

normal

property
normal: Vec2

The normal vector of the hit surface.

point

property
point: Vec2

The point of the hit in world coordinates.

Find your next step

Start typing to search the manual.