Search Results

Search found 119 results on 5 pages for 'multitouch'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • returning correct multiTouch id

    - by Max
    I've spent countless hours on reading tutorials and looking at every question related to multiTouch from here and Stackoverflow. But I just cannot figure out how to do this correctly. I use a loop to get my pointerId, I dont see alot of people doing this but its the only way I've managed to get it somewhat working. I have two joysticks on my screen, one for moving and one for controlling my sprites rotation and the angle he shoots, like in Monster Shooter. Both these work fine. My problem is that when I Move my sprite at the same time as Im shooting, my touchingPoint for my movement is set to the touchingPoint of my shooting, since the x and y is higher on the touchingPoint of my shooting (moving-stick on left side of screen, shooting-stick on right side), my sprite speeds up, this creates an unwanted change in speed for my sprite. I will post my entire onTouch method here with some variable-changes to make it more understandable. Since I do not know where Im going wrong. public void update(MotionEvent event) { if (event == null && lastEvent == null) { return; } else if (event == null && lastEvent != null) { event = lastEvent; } else { lastEvent = event; } int pointerCount = event.getPointerCount(); for (int i = 0; i < pointerCount; i++) { int x = (int) event.getX(i); int y = (int) event.getY(i); int id = event.getPointerId(i); int action = event.getActionMasked(); int actionIndex = event.getActionIndex(); String actionString; switch (action) { case MotionEvent.ACTION_DOWN: actionString = "DOWN"; break; case MotionEvent.ACTION_UP: shooting=false; // when shooting is true, it shoots dragging=false; // when dragging is true, it moves actionString = "UP"; break; case MotionEvent.ACTION_POINTER_DOWN: actionString = "PNTR DOWN"; break; case MotionEvent.ACTION_POINTER_UP: shooting=false; dragging=false; actionString = "PNTR UP"; break; case MotionEvent.ACTION_CANCEL: shooting=false; dragging=false; actionString = "CANCEL"; break; case MotionEvent.ACTION_MOVE: try{ if((int) event.getX(id) > 0 && (int) event.getX(id) < touchingBox && (int) event.getY(id) > touchingBox && (int) event.getY(id) < view.getHeight()){ movingPoint.x = (int) event.getX(id); movingPoint.y = (int) event.getY(id); dragging = true; } else if((int) event.getX(id) > touchingBox && (int) event.getX(id) < view.getWidth() && (int) event.getY(id) > touchingBox && (int) event.getY(id) < view.getHeight()){ shootingPoint.x = (int) event.getX(id); shootingPoint.y = (int) event.getY(id); shooting=true; }else{ shooting=false; dragging=false; } }catch(Exception e){ } actionString = "MOVE"; break; default: actionString = ""; } Wouldnt post this much code if I wasnt at an absolute loss of what I'm doing wrong. I simply can not get a good understanding of how multiTouching works. basicly movingPoint changes for both my first and second finger. I bind it to a box, but aslong as I hold one finger within this box, it changes its value based on where my second finger touches. It moves in the right direction and nothing gives an error, the problem is the speed-change, its almost like it adds up the two touchingPoints.

    Read the article

  • Understanding MotionEvent to implement a virtual DPad and Buttons on Android (Multitouch)

    - by Fabio Gomes
    I once implemented a DPad in XNA and now I'm trying to port it to android, put, I still don't get how the touch events work in android, the more I read the more confused I get. Here is the code I wrote so far, it works, but guess that it will only handle one touch point. public boolean onTouchEvent(MotionEvent event) { if (event.getPointerCount() == 0) return true; int touchX = -1; int touchY = -1; pressedDirection = DPadDirection.None; int actionCode = event.getAction() & MotionEvent.ACTION_MASK; if (actionCode == MotionEvent.ACTION_UP) { if (event.getPointerId(0) == idDPad) { pressedDirection = DPadDirection.None; idDPad = -1; } } else if (actionCode == MotionEvent.ACTION_DOWN || actionCode == MotionEvent.ACTION_MOVE) { touchX = (int)event.getX(); touchY = (int)event.getY(); if (rightRect.contains(touchX, touchY)) pressedDirection = DPadDirection.Right; else if (leftRect.contains(touchX, touchY)) pressedDirection = DPadDirection.Left; else if (upRect.contains(touchX, touchY)) pressedDirection = DPadDirection.Up; else if (downRect.contains(touchX, touchY)) pressedDirection = DPadDirection.Down; if (pressedDirection != DPadDirection.None) idDPad = event.getPointerId(0); } return true; } The logic is: Test if there is a "DOWN" or "MOVED" event, then if one of this events collides with one of the 4 rectangles of my DPad, I set the pressedDirectin variable to the side of the touch event, then I read the DPad actual pressed direction in my Update() event on another class. The thing I'm not sure, is how do I get track of the touch points, I store the ID of the touch point which generated the diretion that is being stored (last one), so when this ID is released I set the Direction to None, but I'm really confused about how to handle this in android, here is the code I had in XNA: public override void Update(GameTime gameTime) { PressedDirection = DpadDirection.None; foreach (TouchLocation _touchLocation in TouchPanel.GetState()) { if (_touchLocation.State == TouchLocationState.Released) { if (_touchLocation.Id == _idDPad) { PressedDirection = DpadDirection.None; _idDPad = -1; } } else if (_touchLocation.State == TouchLocationState.Pressed || _touchLocation.State == TouchLocationState.Moved) { _intersectRect.X = (int)_touchLocation.Position.X; _intersectRect.Y = (int)_touchLocation.Position.Y; _intersectRect.Width = 1; _intersectRect.Height = 1; if (_intersectRect.Intersects(_rightRect)) PressedDirection = DpadDirection.Right; else if (_intersectRect.Intersects(_leftRect)) PressedDirection = DpadDirection.Left; else if (_intersectRect.Intersects(_upRect)) PressedDirection = DpadDirection.Up; else if (_intersectRect.Intersects(_downRect)) PressedDirection = DpadDirection.Down; if (PressedDirection != DpadDirection.None) { _idDPad = _touchLocation.Id; continue; } } } base.Update(gameTime); } So, first of all: Am I doing this correctly? if not, why? I don't want my DPad to handle multiple directions, but I still didn't get how to handle the multiple touch points, is the event called for every touch point, or all touch points comes in a single call? I still don't get it.

    Read the article

  • Ambiguation between multitouch geistures tap and free drag in Windows Phone 8 Emulator (Monogame)

    - by Moses Aprico
    I am making a 2d tile based tactic game. I want the map to be slided around (because it's bigger than the screen) with FreeDrag (It's perfectly done, the map can moved around, that's not the problem). And then, I want to display the character's actions, everytime it's tapped. The problem then appeared. Everytime I want to FreeDrag the map, the Tap trigger always fired first before the FreeDrag one. Is there any way to differ the map sliding than the character tapping? Below is my code. while (TouchPanel.IsGestureAvailable) { GestureSample gesture = TouchPanel.ReadGesture(); switch (gesture.GestureType) { case GestureType.FreeDrag: { //a } break; case GestureType.Tap: { //b } break; } } Every time I first want to free drag (at the first touch), it always goes to "b" first (see commented line above), and then to "a" rather than immediately goes to "a". I've tried flick, but it seems the movement produced by flick is too fast, so freedrag fits the most. Is there any way or workaround to perform FreeDrag (or similar) without firing the Tap trigger? Thanks in advance.

    Read the article

  • Detect multitouch (two fingers touch) on a sprite to apply pinch zoom behaviour

    - by Tahreem
    I am using andengine, want to move, zoom and rotate multiple sprites individually on a scene. I have achieved "move" but for pinch zoom i am unable to get the event to two fingers' touch. Below is the code: public class Main extends SimpleBaseGameActivity { private Camera camera; private BitmapTextureAtlas mBitmapTextureAtlas; private ITextureRegion mFaceTextureRegion; private ITextureRegion mFaceTextureRegion2; Sprite face2; private static final int CAMERA_WIDTH = 800; private static final int CAMERA_HEIGHT = 480; @Override public EngineOptions onCreateEngineOptions() { camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT); EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy( CAMERA_WIDTH, CAMERA_HEIGHT), camera); return engineOptions; } @Override protected void onCreateResources() { BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/"); this.mBitmapTextureAtlas = new BitmapTextureAtlas( this.getTextureManager(), 1024, 1600, TextureOptions.NEAREST); BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(this.mBitmapTextureAtlas, // this, "ui_ball_1.png", 0, 0, 1, 1), // this.getVertexBufferObjectManager()); this.mFaceTextureRegion = BitmapTextureAtlasTextureRegionFactory .createFromAsset(this.mBitmapTextureAtlas, this, "ui_ball_1.png", 0, 0); this.mFaceTextureRegion2 = BitmapTextureAtlasTextureRegionFactory .createFromAsset(this.mBitmapTextureAtlas, this, "ui_ball_1.png", 0, 0); this.mBitmapTextureAtlas.load(); this.mEngine.getTextureManager().loadTexture(this.mBitmapTextureAtlas); } @Override protected Scene onCreateScene() { this.mEngine.registerUpdateHandler(new FPSLogger()); final Scene scene = new Scene(); scene.setBackground(new Background(0.09804f, 0.6274f, 0.8784f)); final float centerX = (CAMERA_WIDTH - this.mFaceTextureRegion .getWidth()) / 2; final float centerY = (CAMERA_HEIGHT - this.mFaceTextureRegion .getHeight()) / 2; final Sprite face = new Sprite(centerX, centerY, this.mFaceTextureRegion, this.getVertexBufferObjectManager()) { @Override public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) { this.setPosition(pSceneTouchEvent.getX() - this.getWidth() / 2, pSceneTouchEvent.getY() - this.getHeight() / 2); return true; } }; face.setScale(2); scene.attachChild(face); scene.registerTouchArea(face); face2 = new Sprite(200, 200, this.mFaceTextureRegion2, this.getVertexBufferObjectManager()) { @Override public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) { switch(pSceneTouchEvent.getAction()){ case TouchEvent.ACTION_DOWN: int count = pSceneTouchEvent.getMotionEvent().getPointerCount() ; for(int i= 0; i <count; i++) { int id = pSceneTouchEvent.getMotionEvent().getPointerId(i); } break; case TouchEvent.ACTION_MOVE: this.setPosition(pSceneTouchEvent.getX() -this.getWidth() / 2, pSceneTouchEvent.getY()-this.getHeight() / 2); break; case TouchEvent.ACTION_UP: break; } return true; } }; face2.setScale(2); scene.attachChild(face2); scene.registerTouchArea(face2); scene.setTouchAreaBindingOnActionDownEnabled(true); return scene; } } This line int count = pSceneTouchEvent.getMotionEvent().getPointerCount() ; should set 2 to the count variable if i touch the sprite with to fingers, then i can apply zooming functionality (setScale method) on the sprite by getting the distance between the coordinates of two fingers. Can anyone help me? why it does not detect two fingers? and without this how can i zoom the sprite on pinch of two fingers? I am very new to game development, any help would be appreciated. Thanks in advance.

    Read the article

  • How to disable multitouch?

    - by cannyboy
    My app has several buttons which trigger different events. The user should NOT be able to hold down several buttons. Anyhow, holding down several buttons crashes the app. And so, I'm trying to disable multi-touch in my app. I've unchecked 'Multiple Touch' in all the xib files, and as far as I can work out, the properties 'multipleTouchEnabled' and 'exclusiveTouch' control whether the view uses multitouch. So in my applicationDidFinishLaunching I've put this: self.mainViewController.view.multipleTouchEnabled=NO; self.mainViewController.view.exclusiveTouch =YES; And in each of my view controllers I've put this in the viewDidLoad self.view.multipleTouchEnabled=NO; self.view.exclusiveTouch=YES; However, it still accepts multiple touches. I could do something like disable other buttons after getting a touch down event, but this would be an ugly hack. Surely there is a way to properly disable multi-touch?

    Read the article

  • iPhone multitouch - Some touches dispatch touchesBegan: but not touchesMoved:

    - by zkarcher
    I'm developing a multitouch application. One touch is expected to move, and I need to track its position. For all other touches, I need to track their beginnings and endings, but their movement is less critical. Sometimes, when 3 or more touches are active, my UIView does not receive touchesMoved: events for the moving touch. This problem is intermittent, and can always be reproduced after a few attempts: Touch the screen with 2 fingers. Touch the screen with another finger, and move this finger around. The moving finger always dispatches touchesBegan: and touchesEnded:, but sometimes does not dispatch any touchesMoved: events. Whenever the moving touch does not dispatch touchesMoved: events, I can force it to dispatch touchesMoved: if I move one of the other touches. This seems to "force" every touch to recheck its position, and I successfully receive a touchesMoved: event. However, this is clumsy. This bug is reproducible on both the iPhone 2G and 3GS models. My question is: How do I ensure that my moving touch dispatches touchesMoved: events? Does anyone have any experience with this issue? I've spent few fruitless days searching the web for answers. I found a post describing how to sync touch events with the VBL: http://www.71squared.com/2009/04/maingameloop-changes/ . However, this has not solved the problem. I really don't know how to proceed. Any help is appreciated!

    Read the article

  • Programatically enable / disable multitouch finger input?

    - by winSharp93
    I have a multitoch-enabled tablet PC running Windows 7. However, when using the stylus pen and getting too far away from the display, I often accidently hit it with my fingers which causes unwanted mouse-clicks. The solution is navigating to "Control Panel - Pen- and Finger Input - Finger Input" and deactivate the checkbox "Use the finger as an input device" (all titles translated so they might be different on an English windows). Now I am wondering whether I can do this programatically, too, so I would be able to write a little tray app for this. I tried using Process Monitor to find out registry keys, however, I did not find one which really shows the same effect as the checkbox. Does anyone know how to access this property (without using UI-Automation)? Cheers winSharp93

    Read the article

  • Enabling multitouch on an acer 5742?

    - by Ben
    I am trying to get multitouch to work on my touchpad. I am currently trying to run a script to get it to work. It is set to start on boot, saved as .run and has been made executable. here is the code: #!/bin/bash #enable multitouch sleep 10 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 8 0 0 0 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 110 synclient TapButton2=2 exit the commands make multi touch work if I enter them in the terminal, but the script itself does not work. any suggestions?

    Read the article

  • Le Touch Pack de Windows 7 est disponible, Microsoft offre ses applications multitouch

    Le Touch Pack de Windows 7 est disponible, Microsoft offre ses applications multitouch Microsoft vient de rendre disponible le Touch Pack de Windows 7. Il s'agit de plusieurs applications gratuites utilisant les capacités multitouch du système. Voici la composition du pack : Surface Globe : Application utilisant le moteur Virtual Earth 3D et permettant de visiter la planète sur le bout des doigts. Surface Collage : Permet de sélectionner un dossier pour en disposer et présenter les images à l'envie. Surface Lagoon : Ecran de veille mais avec lequel on peut interagir, provoquer des remous dans l'eau, attirer les poissons, etc. Blackboard : Jeu ...

    Read the article

  • Multitouch screen needs two touch points

    - by BloodPhilia
    So, I got a netbook (Some weird China brand) and it has a multitouch screen. I got to installing Ubuntu Netbook 10.10 and I used the mouse and keyboard for that. When I wanted to try the touchscreen, at first it didn't seem to work, then I tried to multitouch, and this is what happens: I put my finger on point A I put my finger on point B, while still holding point A. The cursor now jumps to the location on the screen where point A is touched. I can now use point A to drag the cursor ONLY when holding point B. I can use point B for clicking by tapping, but ONLY when holding point A at the place I want to click. What is going on?

    Read the article

  • Elantech multitouch breaks after sleep and unknown events

    - by levesque
    EDIT: I previously thought this was related to mouse, but I have been experiencing these issues without a mouse plugged-in during the past weeks. I therefore rewrote the description. The two-finger scrolling on my UX31 works just fine, but sometimes it stops working, the cause is unknown. Multitouch also breaks whenever I go in sleep mode. Logging out and back in fixes the issue, till it happens again (sleep, or the unknown source) Does this sound familiar to anyone here?

    Read the article

  • Acer touchpad multitouch not working

    - by Lassi
    I tried to get my Acer laptop's touchpad working properly. I installed driver package (psmouse-alps-dkms_0.10_all) which made the side scrolling working. However, the touchpad supports multitouch (works on Windows), but Synaptiks claims that only 1 finger is detected by the touchpad. Thus 2 finger scrolling, pinch & pan zoom and those are not working. Any ideas how I could get these multi-finger gestures working?

    Read the article

  • Making Sense of Multitouch

    [This post is by Adam Powell, one of our more touchy-feely Android engineers. — Tim Bray] The word “multitouch” gets thrown around quite a bit and it’s not...

    Read the article

  • How to use uTouch on multitouch-enabled touchpads?

    - by Freddi
    I currently have a Synaptics touchpad with only few classic multitouch features (2 finger scroll, right click). By installing the uTouch testing suite, I saw that it doesn't accept my touchpad as input device. I want to buy a newer notebook and would like to benefit of uTouch features (window management, swipe, pinch, rotate). Does uTouch only work on touchscreens or also on touchpads? What requirements should I take into account when choosing a new notebook?

    Read the article

  • MacBook Pro Compatibility, Multitouch, and General Experience

    - by jondavidjohn
    I am a Ex-Ubuntu user and decided to go to OSX mainly because I was going to be working in an OSX shop and felt like I needed a more mainstream OS to run Production level software packages like Adobe. 6 months in, and I am more than happy with my MacBook Pro purchase. Just the physical build quality alone warrants the premium price tag, but I am now looking at my day to day demands and realize that I really do not use any software that prevents me from turning back to Ubuntu. My question now is, in terms of 2010 MacBook Pro, How is the hardware compatibility? Does the trackpad multitouch gesture work with 10.10? is it oversensitive? And for anyone that has a relatively new macbook pro that is running Ubuntu, How is the general experience coming from an OSX environment?

    Read the article

  • Apple Magic Trackpad multitouch configuration

    - by Sureshkannan Duraisamy
    Today I installed the Ubuntu 10.10 release on my Desktop PC. I was running Ubuntu 10.04 LTS with an Apple Magic Trackpad and everything was working fine. After today's fresh installation of Ubuntu 10.10, I don't see my Apple Magic Trackpad's multitouch working. Two-finger scrolling and three-finger third mouse button clicking are completely broken. Has anyone else experienced a similar issue? Has anyone had success with Ubuntu 10.10 and an Apple Magic TrackPad? Please help me to fix this issue. Your help is highly appreciated...

    Read the article

  • Alps touchpad detected as a mouse, can't enable/disable multitouch

    - by Shota Bakuradze
    Now I know that this has been asked several times here but I couldn't find any decent solution to it. I am running Ubuntu 12.04 on my DELL N5110 and my touchpad is detected as a mouse, So I don't have the touchpad options availiable. Can't use multitouch and can't disable it either. I have tried the dkms driver from this link. But when I tried to install it with dpkg -i command, dpkg returns the following error: ERROR (dkms apport): unable to determine source package for psmouse-alps-dkms Error! Bad return status for module build on kernel: 3.2.0-25-generic-pae (i686) Consult /var/lib/dkms/psmouse-alps/0.10/build/make.log for more information. I have installed all the updates as well. Can someone help me out with this issue?

    Read the article

  • How can I learn a multitouch screen's communication protocol and write a C# application for it?

    - by puri
    I have got a monitor with multitouch overlay on top of it. It works fine with Windows 7 but I want to write a multitouch application in C# for Windows XP which doesn't support touch feature out of the box. There is no documentation whatsoever and I emailed the manufacturer but never got a reply. However the device works with Google Earth, which doesn't natively support multitouch, on Windows XP. So I think it generates many types of messages together i.e. WM_TOUCH for Windows 7, one for Google Earth COM API, and probably its own messages either in UDP or Windows message form. How can I trap all communications and learn the protocol?

    Read the article

  • Multitouch script (using xinput) no longer working

    - by Pitto
    #!/bin/bash # # list of synaptics device properties http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html#sect4 # list current synaptics device properties: xinput list-props '"SynPS/2 Synaptics TouchPad"' # sleep 5 #added delay... xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 1 xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4 xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 9 # Below width 1 finger touch, above width simulate 2 finger touch. - value=pad-pixels xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 1 1 0 # vertical, horizontal, corner - values: 0=disable 1=enable xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 250 # stabilize 2 finger actions - value=pad-pixels #xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 0 0 0 0 1 2 3 # pad corners rt rb lt lb tap fingers 1 2 3 (can't simulate more then 2 tap fingers AFAIK) - values: 0=disable 1=left 2=middle 3=right etc. (in FF 8=back 9=forward) xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 0 # vertical scrolling, horizontal scrolling - values: 0=disable 1=enable #xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling" 1 #xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling Trigger" 3 Hello everybody... The above script allowed me to use happily multitouch for a month... Now if I do a two fingers scrolling the mouse cursor just runs on the screen like possessed... Any hints?

    Read the article

  • Multitouch screen not detected on Asus Taichi 21DH71

    - by geekfreak
    I just bought this Ultrabook "Asus Taichi 21 DH71". This has Intel 3rd generation i7 processor and 4gb ram with 256 gb SSD. The main feature is that it is a hybrid machine. Naming it has dual screens. When the lid is closed it can be used as a tablet and when lid open it can be used as a notebook. This machine can also be used with the two screens on at the same time. I used ubuntu many years ago and loved it. But I never tried any linux later. My questions are Does the new version of Ubuntu support the Multitouch interface? Will it work specifically on this machine? Will Ubuntu support gestures on multi touchpad? Update 2/22/2013 I did try the latest 64bit Ubuntu(12.10) from live usb and noticed that it couldn't detect the tablet screen. Everything else worked seamlessly. Do you guys think the tablet screen would be detected if I make a complete installation on to the notebook? Please help guys..

    Read the article

  • android multitouch problem

    - by Max
    Im aware that there a a couple of posts on this matter, but Ive tried all of them and none of them gets rid of my problem. Im starting to get close to the end of my game so I bought a cabel to try it on a real phone, and as I expected my multitouch dosnt work. I use 2 joysticks, one to move my character and one to change his direction so he can shoot while walking backwards etc. my local variable: public void update(MotionEvent event) { if (event == null && lastEvent == null) { return; } else if (event == null && lastEvent != null) { event = lastEvent; } else { lastEvent = event; } int index = event.getActionIndex(); int pointerId = event.getPointerId(index); statement for left Joystick: if (pointerId == 0 && event.getAction() == MotionEvent.ACTION_DOWN && (int) event.getX() > steeringxMesh - 50 && (int) event.getX() < steeringxMesh + 50 && (int) event.getY() > yMesh - 50 && (int) event.getY() < yMesh + 50) { dragging = true; } else if (event.getAction() == MotionEvent.ACTION_UP) { dragging = false; } if (dragging) { //code for moving my character statement for my right joystick: if (pointerId == 1 && event.getAction() == MotionEvent.ACTION_DOWN && (int) event.getX() > shootingxMesh - 50 && (int) event.getX() < shootingxMesh + 50 && (int) event.getY() > yMesh - 50 && (int) event.getY() < yMesh + 50) { shooting = true; } else if (event.getAction() == MotionEvent.ACTION_UP) { shooting = false; } if (shooting) { // code for aiming } This class is my main-Views onTouchListener and is called in a update-method that gets called in my game-loop, so its called every frame. Im really at a loss here, I've done a couple of tutorials and Ive tried all relevant solutions to similar posts. Can post entire Class if necessary but I think this is all the relevant code. Just hope someone can make some sence out of this.

    Read the article

  • VMWare Ubuntu guest multitouch touchpad

    - by Petr Marek
    Related: Use Synaptics Touchpad Scroll in VMware Guest I've read that it's not possible to enable multitouch in vmware guest. What confuses me, is that when I use something special (like two finger scroll) in guest OS, I can see the cursor change to the scrolling one. Is this some kind of virtualization bug or is there a possibility that I can enable multitouch in guest? Host: Windows 7 Guest: Ubuntu 12.04

    Read the article

1 2 3 4 5  | Next Page >