Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

An input method used in games; this generally refers to the input used by mobile phones and tablet-type computers.

0
votes
0answers
29 views

Player movement in forward as well as in Left-Right direction

I am trying to make a game in unity in which the player continuously jumps in the forward direction and moves left & right on swipe in android just like in one of the Ketchup game stairs. When I ...
0
votes
0answers
10 views

Android/iOs app: How to get input touch on different zones of an image ?

I'm trying to build my first app/game using Unity 3d. I've added an image and i just want to intercept an event when user touch different zones of the image. How can i do that ? Thanks
0
votes
0answers
14 views

RaycastHit2D collision detection problem?

I want to add a ray to the mouse position and detect the objects with this ray. I made it but there is a problem: ray doesnt collide with objects sometimes. the code: ...
0
votes
1answer
49 views

How to make a horizontal scrolling menu in Game Maker Studio 1.4?

I know how to place the items you see in the picture, my problem is how do I move them? How do I know if the player is swiping right or left? I made the items with a ...
0
votes
1answer
34 views

How do I set something when 2 or more touches are pressed?

I currently have a working controller with left and right but I want to set the velocity of the character to 0/Stop when 2 or more touches are detected. This is my current working code but I want to ...
0
votes
0answers
31 views

Move 2D object to touch position without lag

I'm trying to make an air hockey game for mobile, and the paddles don't follow the touch position fast enough. I would think this would work, but for some reason there is some lag. I've tried some ...
0
votes
0answers
32 views

how can i make a text selector on touch move (like word cookies game)

i want to simulate "touch to select" in android studio (like the following picture) if Anyone has an idea please help me. i have a Constraint Layout that contains 25 Buttons So I place the button ...
1
vote
2answers
58 views

Why does my gameobject fly of into the air when the screen is touched?

I am encountering a peculiar problem when updating a piece of code that translates my gameobject left and right based on mobile touch input. To provide context, the platform upon which the gameobject,...
0
votes
0answers
77 views

How can I improve my touch slide mechanic to be more smooth and fluid?

I have the following C# code, but it leaves me with two problems: ...
0
votes
2answers
71 views

TouchPanel.GetState() Returns wrong touch locations XNA

I am trying to make my Desktop game playable on IOS. I have a Button.cs class, which has this code in it: ...
0
votes
0answers
19 views

LibGdx TouchScreen Movement Logic with Box2D

I'm trying to implement some touch screen controllers to my game and i'm having a few issues :( i don't really understand what's the right way to do it, i can't figure out how to press simultaneously ...
0
votes
1answer
41 views

LibGdx Box2D Touch Input Movement

I've created 2 buttons for movement in my game but when those button are being pressed, the character gets basically thrown away and by pressing only once the movement it's continuous and i don't ...
0
votes
1answer
25 views

I'm Dragging object by using touch (mobile) it doesn't stop when hit collider

I want to make object stopped when it hit collider of another object. But it doesn't stop. How can I fix this? - Unity my code is: ...
0
votes
1answer
55 views

Camera follow while dragging object

I am working on Bowlingball game. And when I move the ball left and right by touching or clicking the camera moves, but it also makes ball keeps moving in the same direction even though I just moved ...
1
vote
0answers
9 views

How do I fix these touch events? Events respond if there are 2 fingers but not 1

I am making a simple game of mine mobile-friendly. The goal is to: Make character walk if a touchstart event is sensed on right half of screen. Stop character if a touchend event is sensed on the ...
-1
votes
1answer
92 views

Unity: input axis raw for touch returning fractions

I am not going to show any script, which may make it complicated. In unity ,when I used the cross platform input manager for touch buttons, the raw axis values returned are in small fractions(like 0....
0
votes
0answers
631 views

How to drag a GameObject with touchscreen - multitouch

This is not a question, rather an answer, so I'm not sure if I should be posting differently, but this took me a while so I'd like to share. This is a code that can be attached to a gameObject within ...
0
votes
0answers
122 views

LibGDX: Implement touch screen, without touching the screen

I'm using LibGDX. Let's say that I wan't to jump - but not really touching the screen, I don't want to use a keyboard forsay, And implement the touch, like i was touching the screen. Can i do that? ...
1
vote
1answer
162 views

Pressing two buttons on Android with same thumb touch. UI Event Triggers not working. Workaround found

NOTE: See bottom of the question as I have managed to use a workaround which works to press the two buttons at once on Android (thanks to Douglas Potestas help) Ive struggled with this in the past ...
1
vote
0answers
240 views

Pressing two on-screen buttons at the same time, with the same touch - Android Unity Event-Triggers

OK so I have this code working and the methods are being called at the times I'd expected (ie. when the mouse hovers over the button and stops hovering over it) But when I test it on an Android ...
0
votes
1answer
462 views

Problem using Event Trigger Unity to change bool , but bool keeps setting back to false

OK so I have used the Unity Event Trigger many times to check for on-screen button presses for Android games. One example I have made many times is a left and right arrow button, which moves the ...
0
votes
0answers
99 views

How do I move my cube right or left on swipe in unity (C#) on touch input [duplicate]

I have already asked this question, but I didn't get any answer, so I am trying to improve my question and add some more detail. I am trying to create a 3d game in unity. I have a cube in unity and ...
0
votes
1answer
2k views

How to move my cube left or right using touch Inputs (C#) in unity

I am trying to create a 3d game in unity. I have a cube in unity and I want it to move left or right on swipe . It should move to a distance till where user swipe or take their finger off of a screen. ...
1
vote
1answer
78 views

Multitouch controls in Android

Im trying to make make game which is intended to be played with the phone in landscape mode, and the player uses their thumbs to control the movement. The game controls look like this: On the left ...
0
votes
0answers
517 views

EventSystem.current.IsPointerOverGameObject(t.fingerId) - Not working on Android builds - Unity

Ok so I have followed through about 5 tutorials and read over 5 separate forum discussions on the above method. For some reason in my game, the touch the UI button does occur, but the touch is also ...
0
votes
1answer
95 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 ...
0
votes
0answers
92 views

(unity3D, C#) Problem implementing interfaces. Null PointerEventData

I have a class that implements IDragHandler, IPointerUpHandler, IPointerDownHandler The methods that are implemented are called but the parameter (PointerEventData) is passed as null My scrip is ...
3
votes
1answer
4k 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
0answers
50 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
1answer
65 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
0answers
154 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
0answers
59 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
2answers
701 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
0answers
99 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
1answer
76 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
2answers
89 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
1answer
324 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: ...
0
votes
0answers
45 views

Prevent gameworld clicks working on Editor but not on device

I'm having a small problem with my game. I have a UI label to act as a pause button (with EventSystem/Trigger in canvas), but if you click it, the game reacts too, so I have the following code to ...
1
vote
1answer
807 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
1answer
95 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
0answers
117 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
1answer
95 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
0answers
40 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
1answer
702 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
0answers
22 views

How can I get the Rect of the elements on GUI and use them?

I'm testing with a game, and wrote the code bellow to make the camera rotate when you swipe on the screen. but one problem is that when you swipe the "crossPlatformInputs" in Unity standard prefabs, ...
0
votes
2answers
660 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
2answers
138 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
1answer
501 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
1answer
84 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
1answer
79 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 ...