- Home /
Slider restrictions
First the Background.
I am a complete beginner and due to a family crisis I wasn't able to attend the introduction courses I needed/wanted.
Now the problem: I want to do a towers of Hanoi puzzle in unity, instead of rings and a tower I am looking to use cubes to build pyramids. I am using sliders for each cube "floor" (top, midtop, midbot and bot). Using a Script I managed to change the materials of each cube depending on the slider position.
My problem now is that I don't know how to make a restriction for the sliders so the puzzle can work. For those that don't know: The objective of the puzzle is to move the stack to another peg following these simple rules.
Only one disk can be moved at a time. No disk can be placed on top of the smaller disk. (in my case, a slider shouldn't be able to be placed at a position if a smaller cube is already there.)
I would really appreciate your help in this problem.
Your answer
Follow this Question
Related Questions
Accessing variables from another object? 1 Answer
Accesing components on multiple objects in scene 3 Answers
Is this accurate? Scenes are composed of objects are composed of components are composed of assets 1 Answer
Check if Object is of Type Component 2 Answers
Confining / Constraining an object transform trajectory to a mesh 1 Answer