Questions tagged [touch]
An input method used in games; this generally refers to the input used by mobile phones and tablet-type computers.
183 questions
1
vote
1
answer
986
views
How to code dragging of objects in 3d space in Unity (Android/ iOS)?
I have been working for many hours trying to figure this out and i can't so I thought once again i'd trouble you kind folks.
Basically I am trying to keep this as simple as possible so I can get to ...
2
votes
1
answer
16k
views
How to enable CrossPlatformInput in Unity?
I'm new to Unity but not a complete programming novice.
I'm trying to use the CrossPlatformInput component from the "Car" prefab from Standard Assets.
I can't see ...
1
vote
0
answers
95
views
Unity - Touch Input help needed
I'm just starting to learn Unity and I must admit at the moment im struggling linking my code scripts together. Im used to having a main class to work from.
I have been trying to implement virtual ...
1
vote
1
answer
202
views
How do I tell the difference between tapping and holding the touchscreen?
I have a problem with the Unity game engine. I am making an Android game. I want to move an object by a small distance every time the user taps the screen, but not when the user holds the screen.
...
0
votes
0
answers
350
views
Using Windows 10 Multi-Touch Functionality In Gamemaker: Studio
I have a multi-touch monitor that I am using in Windows 10. I am getting visual feedback on the monitor itself that multiple touches are being recognised. However, within my Gamemaker game, I cannot ...
1
vote
0
answers
285
views
Handling multiple touches libgdx GestureListener
I've been trying to create a game with two finger gameplay (ie. If your finger is in the bottom 20% of the screen it will move the player along X axis towards your finger, and if you press finger ...
0
votes
2
answers
2k
views
Touch a specific area on the screen in Unity 5
I am building a Roulette game in Unity 5. I want to place bets on a Roulette table when I touch specific areas on the screen with mouse(PC) and touch(mobile).
For example when i touch Number 1 on the ...
1
vote
0
answers
413
views
any help using LibGDX Gesture Listener?
I've been trying to use GestureListener to turn touchscreen into the effect of my dpad.
It all works pretty much, but the touch-held (or longpress) is not always working.
It mostly does work but will ...
-2
votes
1
answer
188
views
Can you please help me transform this script to adequate to mobile touch in unity?
My code here works with a keyboard:
...
0
votes
2
answers
249
views
Raycasting to AddForceAtPosition goes to the wrong direction
I'm trying to get my coin object's Rigidbody to move whichever way it was swiped on by the user through RayCast
...
1
vote
1
answer
508
views
Android: How to prevent player(drag/drop touch input) from moving through non-moving objects?
My player is moved around the screen by touch user input. The user touches the character and drags him to another position. (implemented in touchevent: ...
1
vote
2
answers
2k
views
Hold touch at the screen to move object
I'm using unity2D and C#, and I have a code for touch screen:
...
1
vote
1
answer
154
views
(Unity 5) Weird Touch Behavior
In my (Google Cardboard) Android app I would like to make my camera move on Touch. That movement state should be controlled via a "switch", so when I touch the screen the camera starts to move and ...
1
vote
0
answers
149
views
How to update game handle touch input faster
I'm making a LibGDX game where the player needs to tap to jump. But in this game, the player has to tap extra fast because the player needs to jump extra fast.
The problem is, the program can't ...
1
vote
1
answer
281
views
How to only detect Actor and not background
I'm making a game where I have buttons on a stage, but the background also acts as a "button". But when I press on one of the existing actors on the stage, it also registers a click in the background ...
1
vote
0
answers
59
views
How do you stop touch[].phase when using Joystick prefab?
I have a camera that rotates around the player only in x axis when you swipe on the screen. I have two buttons and a joystick prefab on the UI. I don't want the camera to move when ...
2
votes
1
answer
2k
views
Why does Unity require an EventSystem component for input during a play-test, where input works fine without it in a build?
Please be aware that this was initially a question about how to get the input to work. A comment pointed me in the direction of a fix, but only left me with more questions in regards to understanding ...
0
votes
2
answers
3k
views
Raycast not working on touchscreen (Android tablet/phone)
I have a raycast that works in the unity editor but not when I build it for Android( tablet or phone, neither work). The code I'm using is as follows:
...
1
vote
2
answers
269
views
Unity2D - move rigidbody object with collision
How do I move and collide my object (position given by touch or click), by Using rigidBody2D.MovePosition i can only teleport my character, and by using velocity, my character keeps moving, I want him ...
0
votes
1
answer
722
views
Unity 3d - Touchscript Asset: Get object when "touched"
I have a question regarding the exact method for getting the game object that I'm touching. I thought it would be getting the name of the PressGesture once the touch starts...but it returns me a Swipe ...
0
votes
1
answer
168
views
How do I select a portion of the window using Love2d
I want to be able to divide the window of the game in, lets say, 3 places, and when the mouse (or touch) click one of those places, execute some code.
Do I have to make each portion a button-like ...
1
vote
1
answer
119
views
Making Basic Touch Behaviors
I am trying to make Basic Touch behaviors for my game where i want to
Pan Camera by Single finger touch.
Zoom Camera by pinch With two fingers ofCourse.
Rotate Camera by two fingers rotation.
Rotate ...
0
votes
1
answer
267
views
How can I shoot when I touch the Box Collider
I want to change the Computer Input to Mobile Touch Input, if I press Space Button it shoots but how do I change this [Code] to Touch Input ?
I want it to have it into void OnTouchDown() but what do ...
1
vote
2
answers
74
views
How do I communicate that something is a tutorial button
I made an (ios) arcade game that is rather unconventional, and as a result many people wont exactly know what to do or what the controls are when they first open it. As a results I have had to add a ...
1
vote
2
answers
2k
views
Get world position of touch on objects
In my Unity3d game, I want to get the world position that was touched, when I touch a specific object, regardless of all objects that are in front of it.
How would I do that, I only know Camera....
1
vote
2
answers
2k
views
0
votes
2
answers
2k
views
How do I stop the player from rotating when they collide with a tile?
I use Touch movement and if I jump and hit a corner with the feet of my player, my player rotates but I don't want this. Can anyone help me jumping without rotating if I hit anything ?
here is my ...
0
votes
1
answer
79
views
How to enforce touching within a ring shape?
I'd like to have the player moving the finger within the shaded ring:
The game should be able to detect "out-of-boundary" events once the finger moves outside the ring. How can I accomplish this?
0
votes
1
answer
1k
views
Handle two different touch gestures at same time without overlapping
I'm trying to create a Character touch controls for 2d platform.
In my script Im using one horizontal swipe and hold touch gesture and one vertical swipe gesture without hold.Both are different ...
2
votes
1
answer
1k
views
Distinguish touch gestures for distinct horizontal and vertical commands
In my script below I'm using horizontal and vertical swipe gesture to move the character but both gestures are called on a single touch.
...
0
votes
1
answer
672
views
Swipe and hold character movement not working
Heres my PlayerControl script
...
3
votes
1
answer
886
views
Testing SFML sf::Touch on ordinary PC
So I’ve created a small app that is designed to be used on smartphones and tablets. Accordingly the app makes use of the sf::Touch class which determines the point on the screen of the device that the ...
2
votes
2
answers
222
views
Help with Javascript touch button
I tried many buttons but I can't connect them with the (Java)Script.
So I made 2 gui buttons: one for jump which was easy because I have an if statement and if it'...
3
votes
1
answer
2k
views
How do I quantify the curvature of a touch swipe?
I'm implementing a touch controller for my game.
I am attempting to imitate Tiki Taka Soccer's "ball shooting" controls (gameplay video), where the curvature of the player's swipe affects the curve ...
4
votes
1
answer
739
views
How do I detect if two sprites are being touched at the same time?
How do I detect if two sprites are being touched at the same time?
I was able to detect one sprite, but not if another sprite is being touched by the second pointer.
...
0
votes
2
answers
1k
views
2D Coordinate Based Game [duplicate]
I want to make a game for Android that has a 10x10 Grid Plane as UI.In this game users going to touch on a grid and tihs grid will be painted.
My question is how do I understand which gird or tile ...
2
votes
1
answer
712
views
Keeping Android device awake [closed]
I currently program a game in which the user don't need to interact with the screen. Is there any way to keep the screen awake?
1
vote
1
answer
648
views
libgdx - Check if body is touch
I have some bodies around the screen(Ball[] balls), and I would like to delete them when user touches them.
Also, I have an ...
0
votes
1
answer
3k
views
OnMouseOver() alternative for iPhone (Unity3D/Unity2D)
I am currently developing a game that uses the OnMouseOver() function of a MonoBehaviour object.
Is there a true alternative for iPhone? Would I be better of coding my own?
Thanks in advance
1
vote
1
answer
84
views
How can I clearify users my controlls?
In my game I use a really simple control mechanic to control a character on screen. But my problem is that users do not understand this control.
Beside a little delay problem they work this way:
As ...
6
votes
1
answer
2k
views
How can I avoid a delay with continues touch detection in swift?
I want control a character on my screen with a continuous swipe gesture. As soon as I do a swipe +x or -x my character moves ...
0
votes
1
answer
186
views
How to make a rocket follow players touch using physics?
I'm using Unity to develop a game. Basically I want the player/rocket to follow a point on the screen where user touches. But It's based on physics. Force must be added when user touches somewhere and ...
7
votes
1
answer
3k
views
LibGDX viewport touch coordinates transformation
I've been trying to get LibGDX's viewport and camera unproject() to work and so far none of the tutorials/answers I've found have worked for me.
I have a game window of 840x480 units with FitViewport....
5
votes
2
answers
699
views
Touch taps only on very short flicks on Win7 with Monogame
I have an application on win7 which needs to support touch and mouse input using monogame. But reading touch taps proves to be a very hard thing.
The TouchPanel is initialized like this:
...
0
votes
1
answer
905
views
Touchscript: multiple overlapping colliders
Im building a tower defense game on unity and would like to allow the player to pan the camera on a large map. I am using touchscript to handle the touches.
I made a testing project with the ...
2
votes
1
answer
1k
views
LibGDX - how to detect touchUp with GestureListener?
I'm making a game and I have implemented GestureListener as my inputprocessor. It came with a bunch of methods such as fling, pan, tap etc etc including touchDown. However, there is no touchUp method! ...
2
votes
1
answer
732
views
Unable to achieve two finger panning
I'm looking to achieve a two finger smooth pan system in my project.
However, the code below does not work, any interaction with the screen doesn't change to position of the camera.
I am unsure where ...
2
votes
1
answer
2k
views
Actor not taking touch libGDX
I am trying to handle the touch of one of the Actors in the stage. The following is the code I have written:
...
0
votes
1
answer
2k
views
Libgdx Actor touch undetected
I am looking for detect touch in an actor. The touch in my game is detected in wrong part of the screen. I want to detect touch only on the red circle, here is the code:
Static_values
...
0
votes
1
answer
2k
views
Libgdx detect touch on a specific object (while moving) [closed]
I have a class (I'll call it with letter "A") and class B.
A is the object (as a character) and B is the rendering class which have the aim to show A.
I am looking for a way to detect when A is ...