Checks if two gameobjects overlap with each other, using a rectangular bounding box.
This bounding box is rectangular, for all GameObjects.
This function should be called in your update function.
Parameters
gameObject1: InteractableGameObject
The first gameobject reference.
gameObject2: InteractableGameObject
The second gameobject reference.
Returns boolean
True, if both gameobjects overlap with each other.
Example
constrectangle1 = create_rectangle(100, 100); constrectangle2 = create_rectangle(100, 100); if (gameobjects_overlap(rectangle1, rectangle2)) { // Both rectangles overlap }
Checks if two gameobjects overlap with each other, using a rectangular bounding box. This bounding box is rectangular, for all GameObjects. This function should be called in your update function.