Skip to content

CollisionFilterExtension

lonboard.layer_extension.CollisionFilterExtension

Allows layers to hide overlapping objects.

Layer Properties

This extension dynamically enables the following properties onto the layer(s) where it is included:

collision_enabled

Enable/disable collisions. If collisions are disabled, all objects are rendered.

  • Type: bool, optional
  • Default: True

collision_group

Collision group this layer belongs to. If it is not set, the 'default' collision group is used

  • Type: str, optional
  • Default: None

get_collision_priority

Accessor for collision priority. Must return a number in the range -1000 -> 1000. Features with higher values are shown preferentially.

  • Type: FloatAccessor, optional
    • If a number is provided, it is used as the priority for all objects.
    • If an array is provided, each value in the array will be used as the priority for the object at the same row index.
  • Default: 0.