Intersects
Check if one entity’s collider overlaps another’s. Returns a HitInfo
.
hit_info = entity.intersects(other_entity)
if hit_info.hit:
print('Entities overlap')
Example trigger zone:
if player.intersects(trigger_box).hit:
trigger_box.color = color.lime
else:
trigger_box.color = color.gray