Enlarge Touch Area of Gameobject

Hi,

I am trying to throw a stone object with touching on it, however the area of the stone is too small. I need to enlarge the area where it is touched and thrown, keeping the gameobject’s area the same.

I am using OnMouseUp() and OnMouseDown()

Does anybody have an idea how to enlarge the touched zone?

Thank you all :slight_smile:

1 Like

did you try using a larger image that sits on top and Alpha is set way down to 0?
and is Interactable? so actual visible Image doesn’t need to be Interactable.
maybe you can Mirror the state from Invisible Image to Visible Image?

in kissUI, to Mirror an Image State live, you add it to the list:

Seems as you’re using MonoBehaviour methods you’re not using UI…
But anyway for UI it’s better to do it the opposite way so an image with alpha 0 (or other solutions form here UI panel without Image component as Raycast target? It is possible? - Questions & Answers - Unity Discussions) is a child of the image you want to enlarge the hit area for. This way you don’t need to mirror anything - it just works :slight_smile:

I’m not familiar with unityUI, but that solution does seem to reduce the draw call by one. I can add an option to a kissUI Image that could disable the Mesh Renderer, resulting in the same thing. thanks. :slight_smile: