Topic: Getting the smooth zoom value (in float)?

Hey,
There is an attack ring around the player of about 1 km diameter , it depicts the players you can attack (the player has to be inside it) I am changing the scale of the attack ring based on the zoom level to match the 1km radius. right now it snaps from scale x to scale y when zoom level is changed from say 14 to 15, and as I am using the smooth zoom feature I was wondering if I can maybe get the in between values so I can scale the attack ring more smoothly.

Thanks,
Mridul

Re: Getting the smooth zoom value (in float)?

Hello.

You can calculate the float zoom based on transform.localScale:

float floatZoom = OnlineMaps.instance.zoom + Mathf.Log(OnlineMaps.instance.transform.localScale.x, 2);
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Getting the smooth zoom value (in float)?

Thank you for the quick reply!