- Home /
How to make zoom in and zoom out with a slider on minimap?
Hi
I am a newbie with Unity3d, managed to create a minimap with this minimap tutorial.
I would like to add zoom in/out functionality within my minimap controlled by a horizontal slider. May I know how can I create the zoom scripting for the minimap (GUIStyle) to map to the horizontal slider value?
Thanks.
Answer by Jesse Anders · Jan 27, 2011 at 09:47 AM
I only skimmed the tutorial, but it looks like 'sceneWidth' and 'sceneHeight' are the variables that determine the size of the area shown by the map. If that is the case, then you'll want to tie these variables (or, more likely, a single 'scene size' variable) to the slider, e.g.:
sceneSize = GUI.HorizontalSlider(..., sceneSize, minSceneSize, maxSceneSize);
thanks for ur reply. may i know how do i map the $$anonymous$$imap which is a guistyle to work with the horizontal slider value?
Your answer
Follow this Question
Related Questions
minimap question 1 Answer
Camera only panning on 1 axis 1 Answer
minimap zooming c# 1 Answer
disable camera zooming by browser 0 Answers
Zooming cam by finger gestures 0 Answers