An add on for Unity's Line Renderer this component can simulate the ballistic trajectory defined by its launch settings and optionally calculate collision and bounces.
This component on its own is useful for common cases such as showing the path of a grenade, arrow, thrown object like a basketball, etc.
The point the projectile will start at.
The effect of gravity
The velocity of the projectile
Should the simulation be ran on the OnStart event from Unity
Should the simulation be updated ever frame
If we use collision what should we collide with ... set this to none to disable collision
How far should each step test
How far should the simulation test
How many bounces should be calculated, 0 to disable bounce calculation
How much velocity should be reduced per bounce ... this is a crude simulation of Unity's "bounciness" it will not map 1 to 1 in most cases but is a fair approximation.
A list of points along the path, the distance between each point is equal to the resolution
A list of RaycastHit values for each impact point if any
Call this method to update the simulation, if you have set this Continuous Run this will be called automatically on LateUpdate.