Search Unity

Question Get direction that player swipes finger on mobile?

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

  1. Nsingh13

    Nsingh13

    Joined:
    Dec 17, 2014
    Posts:
    38
    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)?