Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Question Replace Mouse Inputs with Touch Inputs in Bolt

Discussion in 'Visual Scripting' started by bryanmccarthy, Oct 15, 2020.

  1. bryanmccarthy


    Sep 14, 2017
    I'm trying to replace mouse inputs with touch inputs as I want to make a PC/Mac application work on Android. I tried various ways to replace mouse inputs with touch inputs and I still can't get the application to work on Android. I created the application based on this YouTube tutorial

    Here are two screenshots of the Flow Macros:

    ObjectPicker: (FlowMacro).png?dl=0

    RBMoveOnSurface: (FlowMacro).png?dl=0

    What touch inputs will I need to get the app working on Android?

  2. SeaDead


    Dec 23, 2020
    Same issue here ... And there are plenty of questions regarding this issue, but no answer :(
  3. yolostudio


    Aug 20, 2020
    Hello there,

    You can achieve what you want by following the below steps:
    1. Get mouse position using Input.MousePosition.Get node
    2. Get the world point of the mouse position by using Camera.ScreenToWorldPoint node.
    3. Apply the output of step 2 into your game object transform using Transform.Position.Set node

    I pushed the source into this GitHub repository, you can check it out at Assets/Tutorials/MouseInputMobile.

    Another way to get help is to join our Discord Server then send your tutorial request to #requests channel in BOLT TIPS & TUTORIALS category.

    Here is the ready to use APK file working on Android: