Skip to content

Gotchas

William Perreault edited this page Aug 12, 2017 · 1 revision

Gotchas

Entity desctruction

When an entity is destroyed, if it had a PhysicsComponent, upon destoryal a collision event will be fired with a descriptor end. However, at the moment the event is received the fixture will be partially destroyed and any user data thus Colliders are destoyed also which could lead to a null pointer. Therefore it is necessary for the different systems and scripts handling collision events on a global scale, to always test for the existence of the entities contained in the collision event.

NOTE: Scripts do not have to worry about this since the scripting system already does this check.

Entity Rendering

An entity without a Z index component will never be rendered regardless of whether it has SpriteComponent/SpriterAnimationComponent or not.

Clone this wiki locally