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. Dismiss Notice

Mobile control Problem

Discussion in '2D' started by zlxeon, Feb 12, 2021.

  1. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    Hi, I'm working on a 2D jump and run and I wanted to develop it for the mobile phone, so I took the moving joystick out of the Unity assets so far everything went well but I have the problem that my camera follows the player and I don't know how I scramble to keep my joystick in the picture. I've already tried that it follows the player, but it looks very strange and it doesn't work properly
     
  2. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    Put the joystick as a child of the Canvas.
     
  3. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    it doesnt work :(
     
  4. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    he just stops the same place
     
  5. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    I dont think i am understaning then. Dont you want the joystick to stay in the same place the whole time?
     
  6. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    No when i moving with player my camera follow the player but my Joystick not here is a screenshot
     
  7. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    here
     

    Attached Files:

    • Bug.png
      Bug.png
      File size:
      197.5 KB
      Views:
      265
  8. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    i pressed play and the joystick dont moving with the camera
     
  9. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    do you understand?
     
  10. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    Maybe. You want the joystick to move with the camera? Or do you want the camera to be controlled by the joystick?
     
  11. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    Yeh i want that the joystick move with the camera
     
  12. zlxeon

    zlxeon

    Joined:
    Jan 7, 2021
    Posts:
    23
    do you can help me please or anyone other
     
  13. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    Try this video for help: