Data provided from CreateEntityOptions.onOverlap. Has a list of collisions and whether or not they exist on the world map.

Example

 if (overlapData.entityCollidables.length > 0) { // Ensure there is at least one entity that was collided with
const entityCollidable: EntityCollidable = overlapData.entityCollidables[0]; // Get the first collided entity
if (enemyID == entityCollidable.entityID) { // enemyID would be the entityID of an pre-defined enemy
console.log("The player collided with an enemy!");
}
}
interface OverlapData {
    entityCollidables: EntityCollidable[];
    map: boolean;
}

Properties

entityCollidables: EntityCollidable[]

Array of entites the entity with onOverlap collided with

map: boolean

Does the collision take place on the world map?