spatial_like¶
- class SpatialLike¶
Abstract class that provides the necessary methods so that an object that can be added to a
SpatialHashMap.- abstract property collision_mask : set[str]¶
A set of strings representing the collision layers that this object collides with.
- abstract property collision_set : CollisionSet | None¶
Set of
CollisionShapewhere the Entity’s position acts as their origin.
- abstract property global_position : Vector¶
Position of the object, expressed in global space (world space). The sum position of this object and all of its parent’s positions combined.
- abstract property position : Vector¶
Position of the object, expressed in local space. Local space can be either global space (if the EntityLike exists in a Blueprint at a root level) or local to it’s parent Group.
- get_world_bounding_box() AABB | None¶
Gets the world-space coordinates AABB that completely encompasses the
collision_setof thisSpatialLike. ReturnsNoneif the collision set of the target object is unknown.
- get_world_collision_set() CollisionSet¶
Get’s the world-space coordinate
CollisionSetof the object, AKA the collection of all shapes that this EntityLike interacts with.- Returns:
A copy of this objects
CollisionSetwith the correct world-space location.