Revine provides a way to detect and handle when the two objects hit each other or not. You can use hit
on the two objects as shown below
box1.hit(box2)
The hit
function returns a boolean value True
if the objects hit other and False
otherwise. You can use the hit interaction with the soon-to-be-launched if statement to check for collision and then take some actions as per the state.
Notice any errors or typos? Please let us know or feel free to edit hit.md and issue a pull request.
Follow us on twitter @RevineLang
Built by Arpit Bhayani