Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Get direction that player swipes finger on mobile?

Discussion in 'Input System' started by Nsingh13, Dec 22, 2020.

  1. Nsingh13


    Dec 17, 2014
    How would I go about doing this? After doing some research on the new input system, it seems like there is not much to go on. I want to get the direction a user swipes their finger on mobile. Based on this direction, the player should add a corresponding force to an object in that particular direction. I've been looking into custom interactions and used the sample script provided in the documentation, but the custom interaction is not working. Is using a custom interaction the best way though? Is there not any other way I can obtain the swiping direction for the player? Maybe I should just use the old input system for this (but I don't think it's possible to use both new and old input systems)?