An input method used in games, thich is generally reffered to input used by mobile phones and tablet-type computers.
0
votes
0answers
26 views
unity UI buttons staying highlighted after touch
i have a touch dpad giving me some weird issues i havent experienced in older versions of unity.
after building the game and running on android i am noticing that some touches to the dpad are leaving ...
0
votes
1answer
12 views
Unity, 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
2answers
38 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
2answers
48 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 ...
1
vote
1answer
37 views
Libgdx, actor touchlistener not working
public class Main extends ApplicationAdapter {
SpriteBatch batch;
OrthographicCamera camera;
Stage stage;
Image greyback;
Image circle;
private float width;
private float height;
@Override
...
0
votes
2answers
55 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
1answer
34 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
1answer
64 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 ...
3
votes
1answer
87 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.
void Update ()
{
HorizontalSwipe();
VerticalSwipe();
}
...
0
votes
1answer
48 views
Swipe and hold character movement not working
Heres my PlayerControl script
void Update () {
foreach (Touch FingerTouch in Input.touches)
{
if(FingerTouch.phase == TouchPhase.Began)
{
...
0
votes
0answers
77 views
Simulate a touch on a point where ray hits in Unity
I want to simulate a touch input on the position where a ray hits an object, and only if it hits something.
I know that it's not common to do it with a raycast, but I need it this way for the HTC ...
3
votes
1answer
104 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 ...
1
vote
2answers
68 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's true then jump.
But I have ...
1
vote
1answer
171 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 ...
1
vote
1answer
115 views
How to detect if two sprites are being touched at the same time?
I tried this:
if(spr.getBoundingRectangles.contain(x,y)){
//do this
}
but how to detect if the other sprite is touched by the second pointer?
Then I created two Vector3 for the pointer ...
0
votes
0answers
36 views
How to detect number of pointers being used on screen?
I wan't to be able to detect if the screen is touched by two fingers at the same time.
final int MAX_NUMBER_OF_POINTERS = 20;
int pointers = 0;
for(int i = 0; i < MAX_NUMBER_OF_POINTERS; ...
0
votes
2answers
215 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
1answer
154 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
1answer
164 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 Image as userData of the bodies.
I dont want to make a function to all ...
0
votes
1answer
170 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
1answer
38 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:
...
0
votes
1answer
165 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 left or right. And as long as I hold my finger it continuous to move to the ...
0
votes
1answer
91 views
Need help with 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 ...
2
votes
1answer
195 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 ...
2
votes
2answers
133 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
1answer
299 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 ...
1
vote
1answer
146 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
1answer
58 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 ...
1
vote
1answer
446 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:
public class MyGame extends ApplicationAdapter
{
private GameStage gameStage; //Game ...
0
votes
1answer
364 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
public class ...
-1
votes
1answer
206 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 ...
0
votes
2answers
100 views
Touch through GameObject, best practice
in the game I am doing atm you have an area with monsters.
There are two modes to damage monsters :
tapping on them
casting spells on the ground
Tapping and damaging a monster works fine.
The ...
36
votes
9answers
6k views
How can I quantify a drawn line's straightness?
I'm working on a game which requires players to draw a line from a point A(x1,y1) to the other point B(x2,y2) on the screen of an Android device.
I want to find how well that drawing fits to a ...
1
vote
1answer
96 views
Libgdx - How to change GestureListener pan finger sensibility?
I implemented GestureListener in my Overlap2dStage to pan the camera when the player drags its finger over the screen. But I also have some actors that extend InputAdapter to detect when the user ...
0
votes
1answer
54 views
Projectile Shoot three at a time
In my game there is a bird flying and on touch it throws different artifacts projectile downwards. And these artifacts should hit the containers moving right to left on the screen. Now if user keeps ...
0
votes
1answer
560 views
In Unity for Android, how do I create touchable buttons?
I'm making a test game for Android in Unity 5, and I want to add left-right control buttons like the circles below, to move an object left or right.
How can I do this?
Sorry if this question is ...
0
votes
0answers
115 views
How to make touch events work in a match three type game
In "match three" types of games like Crazy Kitchen, when the user touches an image, he can drag his finger over multiple images and create a change in each image he touches in a single gesture. You ...
1
vote
2answers
75 views
atan2 : inversed result? (angle 180 is on the right side, angle 0 on the left side)
the result of the angle between my touch and the middle,bottom of the screen gives me 180 when the touch is on the right side of the screen, and 0 when it is on the left. I don't understand why...
...
1
vote
2answers
70 views
How do I show a small sprite being dragged by touch?
In my mobile game, users drag shapes across the screen. Think of it as a classic Lines game, where you drag a dot on the field, or a chess game where you drag and drop pieces.
The problem is that the ...
0
votes
1answer
132 views
Cocos2dx - Touch not recognized on Android
I'm having trouble with a touch listener not picking up touch events on android, but doing fine in windows (mouse input). I've got a Node listening for touches (not a Layer), but from what I've been ...
1
vote
1answer
141 views
Working out velocity/time based on physical pixels moved
In my game I integrate like so: (Please assume all variables to be declared)
sprite.xTimeInSeconds = 5.0; //Time in seconds it should take this object to cross screen
sprite.xVelocity = ...
0
votes
3answers
538 views
How to flick gameObject using Touch?
I've been searching for a solution for my problem for a while on the web, but i didn't find anything that work properly
What i want to do
I have a bouncing ball and I want to let the user flick it ...
1
vote
1answer
884 views
How does Unity input work with touchscreens
I'm trying to make a racing game on android using unity. I want to make a car move forward when I touch an image button like in the picture below. I've already made it work using the keyboard. How ...
0
votes
2answers
245 views
Simple LibGDX Pong game drag player instead of getting x position
I got a working pong game in LibGDX but when I touch the screen the player x automaticly jumps to the coordinates I touched. I wan't my game to detect I touched and then move the player to the ...
2
votes
1answer
20k views
How to detect that user has touched UI canvas in Unity 4.6?
In my 2d game I have a HUD with some buttons on it. To make it I am using new UI system, which was presented in Unity 4.6. When user is touching button, I am running method, which was declared in ...
1
vote
1answer
402 views
LibGDX Touch Delay
So I'm trying to make a game in which you have to tap things fast, but the thing is - after you touch something (the area I chose), it takes like 2 more seconds to register another touch.
Now, I think ...
1
vote
1answer
90 views
Libgdx--how to store every single point drawn using touchdragged?
Basically i am trying to detect line collision. The problem is when intersection occurs quickly(touch dragged is done quickly like fling), the collision is not detected. It seems as if 'touch dragged' ...
0
votes
2answers
484 views
What is the best practice for handling touch events on different GameObjects in Unity2D?
First of all I want to describe what I have in my scene.
1. Joystick.
2. Main character that has link to joystick and handles touch events from joystick.
2. Buttons.
3. Other GameObjects that must ...
0
votes
1answer
165 views
How can I cycle through sprites when the player touches some UI element?
if(Input.GetKey("y")){
gameObject.GetComponent<SpriteRenderer>().sprite = Characters[0];
}
if(Input.GetKey("u")){
...
2
votes
2answers
741 views
Card game - creating card Listener
I am making a card game where there are 21 cards on hand and 2 options from where user can draw cards to his hand and throw a card from hand.
I am new on game development and I'm following the ...