Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to make Archer right?

Discussion in 'Scripting' started by Shayke, Mar 8, 2019.

  1. Shayke

    Shayke

    Joined:
    Dec 8, 2017
    Posts:
    352
    Hi, i am making an archer game and my mechanism is not so good.
    What i did was rotating the player with the mouse and calculate the angle between 2 dots
    The speed was by using pythagoras on a and b, and the angle is Tang.
    any better ideas?
    and how can i rotate the arrow to make it feel realistic?
    upload_2019-3-8_21-22-59.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,514
    Gonna need more info than that. Show a video of what it does, post some code (please use code tags), or at the minimum post a diagram of what it does and what you want it to do.
     
  3. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536