Search Unity

Trajectory path as line and not dots

Discussion in '2D' started by jppstudios, Jan 20, 2022.

  1. jppstudios

    jppstudios

    Joined:
    Apr 6, 2021
    Posts:
    29
    Hey guys, i m working on a 2D platformer in which the player can shoot arrows. I would like to visualize the path, which the arrow will take. All the tutorials regarding this topic use dotted trajectories, but is it possible to use a line, which gets slimmer further down the line ?


     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    You could start with the LineRenderer component built into Unity and just fed in the series of computed trajectory points.
     
    jppstudios likes this.