Projectile Trajectory Prediction in Unity

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 3

  • @abhinawram4014
    @abhinawram4014 Рік тому +1

    What to do for making the trajectory line move straight in y axis only. I don't want to move the line renderer in z axis.

  • @daltonguthrie3544
    @daltonguthrie3544 Рік тому +1

    What would be the quickest way to have the length of the trajectory line draw dynamically?
    I was thinking maybe a raycast that would follow the line but I’m not sure if you can make a raycast act the same way.

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому

      Hey!
      Do you mean the shortest path by the "length" ? Generally the trajectory itself is not difficult to draw. It is the collision detection that is tricky. Drawing a line is done through a line renderer.
      A LineCast is a bit more efficient than Raycast if like in our example you know the points between which we need to look for collisions - if by quick you mean more efficient.
      I hope it helps!