- Home /
This question was
closed Jan 07, 2018 at 02:07 AM by
ZtekMiniGame for the following reason:
SOLVED
Question by
ZtekMiniGame · Jan 01, 2018 at 07:30 PM ·
rotationbuttonsbutton trigger events
Setting this Event trigger up to not do the function when trigger is up
I have a 4 buttons on my screen to control the rotation of an object. I have one part functional, but I still need a way to make the buttons not work when not being held down with Pointer Up. How can I do that with this script. public class TiltFile : MonoBehaviour { private int up = 0; private int side = 0; void Update() { gameObject.transform.Rotate(side, 0, up); } public void RotateUp() { up++; } public void RotateDown() { up--; } public void RotateLeft() { side--; } public void RotateRight() { side++; } }
Comment
Follow this Question
Related Questions
Buttons not working in scene! 0 Answers
How to make UI button work on HoloLens? 1 Answer
How to intantiate an object in front of a rotating object 1 Answer
How do i make the perfect button? 1 Answer