Detect if UI element is over Gameobject

I want to be able to detect if a UI element is over a gameobject and return true if it is. I need it so that if any part of the UI element is touching the gameobject then it returns true.

I was originally using cursor position but that did not work as something the user can drag and drop the item to the gameobject position and it does not register.

165370-1.png

This should return as true.

165372-3.png

This should return as false.

use on trigger enter

OnTriggerEnter()
{
         //event here
}

plz help on my question

I’m finding it hard to even get the world position of a moving UI object. I think if I could get that I could atleast make progress.