- Home /
Problem with a button made
I have created a 2D game.
The game is almost complete but now i am facing a problem with the buttons I made. In my game I have kept that on touching on the screen any where the character shoots a rocket. Also there is a jump button and other three buttons on the screen,now as I touch on the buttons the character shoots a rocket that side of the screen this creates a difficulty while playing the game and the enemy kills us.
I want to know how can I edit it so that when we will touch on the buttons the character will not shoot a rocket.
Please help me,I am new to all this.
Are your buttons in OnGUI or are they world space objects/planes?
Answer by joseques · Feb 23, 2014 at 06:40 AM
Try using a script with GUI based buttons instead of GUITextures in GameObjects
http://docs.unity3d.com/Documentation/ScriptReference/GUI.Button.html
Answer by Arbaaz_k · Feb 26, 2014 at 05:01 AM
Insted of making a GUI button i created a Collider on that area it is a little non responsive but it works after. But Thank you anyways
Your answer
Follow this Question
Related Questions
Changing Axis to Buttons 2 Answers
2D pong game. HELP 1 Answer
How to Disable Horizontal Movement in Crouch Position? (2D) 2 Answers
A node in a childnode? 1 Answer
Using Texture Assets in Code 1 Answer