- Home /
Creating a slider from a sphere
Hi all, I've been trying for days to create a sphere that will act like a slider, meaning I can set a number that will affect the percent of the sphere that is visible.
I'm attaching two pictures to demonstrate how the sphere should look like for input -+10%:
and -+70%:
Any Help will be very much appreciated!
Unless you need a single sphere (-part) mesh, I would use for example the 10% mesh as prefab and instantiate a new (rotated) one for every 10% (so 7 meshs for 70% :) ).
I'll need to use it from 0% to 100% and support each percent so for 100% ill need to use 100 meshs \=
Oh. I didn't try it, but perhaps you can create one small mesh (1%), duplicate this and combine the resulting meshs like in doc
Will it be changing frequently? Is performance going to be a problem?
As mentioned, a hundred 1% meshes would probably work fine. Just side-by-side. $$anonymous$$aybe try it as a quick test. A faster way might be to have a 10% and 1% mesh. Or add 5% and 50% meshes. Could get it to where every number is only a handful of objects combined.
Do you know the $$anonymous$$esh class? (you didn't say what you've been trying for days.) You could build the mesh yourself (out of a series of half-circle hoops.) That would probably run faster if it stays the same size (and rolls around or something?)
I think you could do it with [procedural meshes][1] [1]: http://wiki.unity3d.com/index.php/ProceduralPrimitives
Your answer

Follow this Question
Related Questions
Is there is any way to cut a Primitive object when I touch with mouse. 2 Answers
make checkpoint in sliderbar 0 Answers
Slider UI rotate image/sprite 1 Answer
how to move the player on a sphere or cube? 1 Answer
GUITexture with Sphere Collider 2 Answers