Can you detect if two elements touch each other?

I want to trigger a JavaScript function the moment two elements touch each other. For example the moment a small circle enters a large rectangle. Been searching around and have not yet found a good solution to this (unless I define absolutely everything in JavaScript).

There is no feature that can do this at the moment. You’ll have no choice but to track the location in JavaScript.

What is your use-case for this? If I undrestand what you’re doing I might be able to provide an alternative or enter a feature request.

The intention was to make a game about dodging elements coming towards you. For example you slide a circle back and forth at the bottom of the screen and small objects fall towards it. Game ends when an object touches the circle.