An input method used in games, thich is generally reffered to input used by mobile phones and tablet-type computers.
0
votes
0answers
25 views
Android: Collision with Swept AABB algorithm, how to compute velocity correctly (in onTouchEvent)?)
I have difficulties implementing the AABB swept collision algorithm for collision dectection in android.
Let me explain my problem in detail and post some of my code at the end of the post.
I have ...
0
votes
1answer
32 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: actionmove and actiondown). I want the touch-...
0
votes
0answers
30 views
Is the touch position on Android and iOS the same?
There is a small difference in the touch position detected on my current Android device in reference to all the iOS devices I’ve tested so far. It is noticeable in the way that I need to touch the ...
0
votes
0answers
24 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 ...
0
votes
1answer
51 views
Hold touch at the screen to move object
I'm using unity2D and C#, and I have a code for touch screen:
if (Input.touchCount > 0)
{
Touch touch = Input.GetTouch(0);
if (touch.phase == TouchPhase.Began)
{
...
1
vote
1answer
32 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
40 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
20 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
28 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 touch.phase is ...
0
votes
0answers
56 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
16 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
82 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:
public class DirectionalTilePlacing : ...
1
vote
2answers
45 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 ...
3
votes
0answers
42 views
Unity's Touch API is exposing only half of the available Android touch data (image attached)
Unity is only exposing half of the touch data that Android itself receives. I'm using the standard Input.touchCount and Input.GetTouch() API. My test scene is quite simple.
My game is precision swipe ...
0
votes
1answer
83 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
38 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
53 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
1answer
71 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
42 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
67 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
2answers
72 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
60 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
39 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
122 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
152 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
106 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)
{
FingerInitialPosition=...
0
votes
0answers
158 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
183 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
110 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 ...
3
votes
1answer
413 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 ...
3
votes
1answer
176 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
2answers
293 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
273 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
225 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
326 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
40 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:
...
1
vote
1answer
357 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
93 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
464 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....
4
votes
2answers
237 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:
TouchPanel....
0
votes
1answer
401 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
295 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
86 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
1answer
848 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
561 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
296 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
125 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
7k 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 ...
2
votes
1answer
144 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
55 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 ...