- Home /
Bend Image/Filled Image detect mouse enter/exit
Hi,
I'm trying to bend an UI Image like this: My idea was to create a circle image and filled ui image components to build a radial menu. My problem is that I can't use OnPointerEnter/OnPointerExit because it gets called then I hover over the RectTransfrom of the image, but I want it to be called then the mouse hovers the filled part... Anyone here who has an idea how to either create a bend image without a filled image component, or create a better detection for the mouse? Thankful for any help
Answer by Bunny83 · Jul 21, 2016 at 03:18 PM
Most radial menus do the detection mathematically based on the relative vector from the center. The exact code depends on what kind of radial menu you want.
However most menus have a minimum radius / dead zone around the center. As long as the cursor is within that circle, nothing happens. As soon as you cross that circle one item is selected. What item gets selected is determined by the angle of the vector from the center to the cursor. Each item covers a certain range around the unit circle.
Your answer
Follow this Question
Related Questions
Turn Another UI image on and off with a Single UI Button 1 Answer
UI image with button component not tracking mouse correctly 1 Answer
Image renderer stretching sliced images 1 Answer
Scrolling one UI image causes every other UI image to start scrolling 1 Answer
Strange UI Automatic Navigation behaviour, potentially bug. Can anyone help? 0 Answers