How can a make on click jump small but if a person hold button jump higher....
How can a make on click jump small but if a person hold button jump higher. im making a 2d platform game for android. I want to make my player jump if user click the button but if he holds the button...
View Articlehow can my player keep jumping wen it hit ground again?
I want to make my player to keep jumping wen it hit the ground a gain if I'm holding my button down, but right know it only jumps one for each time a click or hold the button . is for mobile divice....
View ArticleUI in world space, but not resizable with zoom
Hello, if someone can helpme with this. I have a lots of solar systems (2D game) and they have a canvas in world space mode (a raw image for example as child indicating where they are). When i zooms...
View Articlehold touch to move, tap to rotate
public float holdTime = 4f; void Update() { Move(); } public void Move() { if (Input.touchCount == 1 && Input.GetTouch(0).phase == TouchPhase.Stationary) { float startTime = Time.time; if...
View Articlehold key unequip sword
Hi, i want to know how can i make the code for unequip/equip a blade only when i press "mouse1" i mean, i press attack and the character give the sword to attack, but when i hold the key, the sword...
View ArticleSwipe and Hold to move character .
Hi all , I am trying to move my character by following gesture : User swipes on screen ( this swipe determines which direction character is suppose to move ) and then without lifting the finger holds...
View ArticleHow to play loop an audio clip on button hold down?
Hey guys im really new in what comes to Unity. I'm trying to make some drum pads to have individual sound that when you press and hold it it will loop. So far i got to this script but i can't make it...
View ArticleMove while mouse button is held down
Hello folks, I'd start by saying I'm new to coding and unity. I've been working on a little personal project mainly working from different tutorials trying to modify things to my liking which has been...
View Articlehow to hold button longer, the more powerful shot ?
I'm sorry about this noob question. I have a gun and when I press the button "fire", how to hold it longer, the more powerful shot. I can not get the time value when holding the button.
View ArticleMy Rigidbody can stick/hold walls
When I jump into a wall, and hold the button in the direction of the wall, my rigid body character can hold/stick to the wall for a bit. Here is my code (And no switching to character controller is not...
View ArticleIncreasing value by one every second, if right arrow is pressed - C#
Hello, I have a float "Levelint" and I want to increase it by one while I am holding the right arrow. So, when I hold the right arrow it will increase by one, every second, and if I just press the...
View ArticleHold to peek or peek and pop in android
I need help on how to hold to peek or peek and pop in Android by adding or editing this code. using UnityEngine; using UnityEngine.UI; using System.Collections; using UnityEngine.SceneManagement;...
View ArticleInput.GetMouseButton(0) registering twice on relase?
I am using Input.GetMouseButton(0) to add force to my character. The problem is that it seems to register twice when I release the mouse button. Why is this happening? this is the code I am using: if...
View ArticleHow to get touch's positon when I hold the button??
I have some ways to solve this problem but its too troublesome. Hope you guys can provide me with any solution. Thanks in advance. public void OnPointerClick(PointerEventData eventData) {...
View ArticleHow to hold button/key at a right timing
Hi ! Got a rythm game I try to make, and got a problem with duration's note. I would like my note to be hit at the right time, and for a precised duration. For now and for example even though i know...
View ArticleHow to make a physics based jump with button hold effect
Hi I have made a character jump script for a sphere character which will make my character jump higher when the button is held. (I have a wall jump mechanic as well.) ---------- It works rather well,...
View ArticleMovement help
Hello! I am very stumped on how to start my script code on movement. I already done the hold touch to increase power bar mechanic but I want the mechanic to be when I touch and hold the screen, the...
View ArticleTap&Hold Android Game - weird problem with touch
Hello. Im making android game with tap and hold mechanics - when you tap and hold finger on your screen, the spaceship is flying. If there is no finger on screen - the spaceship i falling. I have...
View ArticleHold Down Button
I'm making a FNaF game, and I am making my own 'puppet' how could I make a button that'll slowly go down and then when I hold the button it'll go up, and if it reaches nothing (i'll make something...
View ArticleMake player only jump as long as the button is held?
I am creating a small platformer game for a 4-day contest. I just started, and I am trying new mechanics that I never have before, such as a double jump, wall kick, sprint, and dash. I'm not all that...
View ArticleCheck for Shift in an If Statement, RTS giving several commands
I want to check wether Shift is pressed before the building is placed, so that "if shift is pressed" another building might get placed. I came up with this code, however it does not seem to get the...
View Articlerotating around by holding (android)
i want to rotate around based on where i hold (left or right). The game is for android.
View ArticleLaunch ball after too long waiting
Hello, I would like to add a function to my game, so if the player holds a left mouse button for too long (let's assume for 5 seconds) the ball is fired anyway. I've added float timer, and float hold...
View ArticleHow can i make a hold method for addforce?
Hi, I'm new in unity I have a small issue I've tried to make a hold method for my button the button is working but the hold method is not if anyone can help me I'll be so thankful,this is my code using...
View ArticleHow to use hold/tap interactions in new Input System
Hi, I'm learning the new Input System and can't figure out how to use interactions. Everything is set, but I do not know how to code to do one thing with a single "tap" and another thing with "hold"....
View ArticleNew Input System Hold/Tap stucks with numbers
Hi, I wanted to give a button a Tap and Hold function with the New Input System. It is working fine so far, as I'm using letters and the Arrow Keys. My Setup is like this: ![hold tap letter][1] and my...
View ArticleHold on : Importing assets. How to solve it?
There is a problem in Unity. I'm writing code in the visual studio. Then after I switch to unity, it says hold on importing assets. And it never ends. I turned on the last computer and went out for 4...
View ArticleUnity loop Application.EnterPlayMode
When I hit Play Unity makes me wait infinite time before start the scene. The message in Hold On window is "Application.EnterPlayMode Waiting for Unity's code to finish executing". There is only one...
View ArticleHow to avoid Application.tick (hold on message after runtime)
Hi! I have problem with this message box after each time that i stop my scene in the editor: ![alt text][1] Only takes around 15~20 seconds, but its so tedious always that you stop the scene. This is...
View Article