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 have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

any script that make my crosshair orbit the player and can be moved using joystick like mini militia

Discussion in '2D' started by HelloOreo, May 4, 2019.

  1. HelloOreo

    HelloOreo

    Joined:
    Jul 20, 2018
    Posts:
    1
    so I am making a multiplayer game but I am starting at the easiest part which is setting the players where I already did the movement and jump scripts and now I am doing the gun part where I need a script that makes my crosshair move around my character or simply orbit it and can be controlled by joystick . I've been reading things like joining two axis values and very complicated to me and I am struggling for my game anyone wanna check out my inspiration:
    so I hope someone would help me I am new and trying to learn unity.
     
  2. jc-drile77

    jc-drile77

    Joined:
    Jul 1, 2014
    Posts:
    229
    Joystick Vector.normalized * bounds + Player Position = crosshair position.