Hi Kathi,
I’m not quite sure if i understand your question correctly, so i answer anything i can think of 😛
In case you want to check which entity you collided with:
BoxCollider {
// ..
fixture.onBeginContact: {
var fixture = other;
var body = fixture.parent;
var component = body.parent;
var collidedEntity = component.owningEntity;
// now you can access the entities properties and functions
var collidedEntityType = collidedEntity.entityType;
}
}
In case you want to check the space around the entity for other entities you can use physicsWorld.bodyAt(Qt.point(x,y)). This is used in the StackTheBox demo game for example.
Cheers,
Alex