Search Unity

How to Predict Grenade Trajectory Positions?

Discussion in 'Physics' started by giraffe1, Nov 16, 2018.

  1. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    179
    I attached a youtube video as an example incase you don't understand.


    Basically my NPC's throw grenades simple by using rigidbody.velocity

    As the grenade is thrown I instantiate a sphere every 0.1 seconds and draw an arrow from the previous sphere position to the new sphere position. I rinse and repeat this until it hits the ground. This shows the trajectory while it is airborne.

    Once it hits the ground it rolls a bit more from the momentum before stopping. Is there any way for me to get/capture/predict these positions before it actually happens?

    Or better yet can I get/predict all the positions from start to finish before it actually happens?

    The few trajectory prediction assets on the store seem to predict the positions while the grenade is airborne mainly. Does anyone know an asset that can also predict the positions while it rolls around on the ground? or is there any easy method to achieve this?

    Thanks a lot.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,481
  3. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    179
    Thank you,