- Home /
How to scale an object relative to mouse position
Hi guys,
I'm using Unity's UI system and I'm trying to add the ability to zoom in with the scroll wheel, but I want it to zoom based on my mouse position. I've tried a lot of things and everything seems like a hack. Right now I'm adjusting the localScale of the object based on mouse zoom, but it's zooming from the pivot point of the object. That's what I'm trying to get around.
Thanks.
Comment
Best Answer
Answer by tatelax · Jul 23, 2015 at 07:04 PM
I was able to solve this problem by using a camera combined with 2D sprites, instead of UI elements to give the effect that I needed.