BigWorld represents the live world as spaces containing engine-managed entities. A database ID, vehicle type ID and live entity ID are not interchangeable.
Entity access
BigWorld.entities
Historically provides a mapping-like view of currently cached client entities. Membership changes as entities enter and leave the client area of interest.
BigWorld.entity(id)
Looks up a live entity by engine entity ID. A missing result is normal when the entity was destroyed or is not currently known.
BigWorld.player()
Returns the current player entity, which may represent different account or avatar contexts.
def get_live_entity(entity_id):
entity = BigWorld.entity(entity_id)
if entity is None:
return None
if getattr(entity, 'isDestroyed', False):
return None
return entity
Spaces
A spaceID identifies an engine world space. Models, cameras, collision queries and
entities must refer to the correct space. A reference from a previous battle can remain as a
Python object while its native space is already invalid.
- Read the space from the current live context instead of caching it globally.
- Discard space-bound state on arena exit.
- Do not move objects between spaces by changing an ID blindly.
- Treat space creation, clearing and geometry mapping functions as engine-internal unless a current use case proves otherwise.
Position and matrices
Entity position, direction and transforms are commonly exposed through vectors and matrix providers. A provider can be live: reading it later may yield a different transform.
Collision queries
Older client references expose BigWorld.collide(spaceID, src, dst) for line-segment
collision tests. Return shapes and collision payloads are version-sensitive, so inspect current
call sites before interpreting the result.
player = BigWorld.player()
space_id = getattr(player, 'spaceID', None) if player else None
if space_id is None:
return
result = BigWorld.collide(space_id, start, end)
if result is not None:
handle_collision(result)
Ownership rule
Never retain a live entity merely because its numeric ID might be reused later. Store the stable domain identifier you need, then resolve the current entity again inside the active arena.