TrajectoryObject.SimulateTrajectory(GameObject originator, Vector3 startPosition, Vector3 endPosition)
.Thank you for answering. I'm doing a custom throwable with my own aiming system will this be able to traject the velocity of the grenade using TrajectoryObject.SimulateTrajectory ? Or this is just for the line renderer. Somehow the direction of ThrowableItem.Velocity is relative on the camera whilst I wanted to do the direction from the character position to endpoint (target ground) .The line drawn is based on which version of TrajectoryObject.SimulateTrajectory is called. ThrowableItem.LateUpdate passes the item's initial position, velocity, etc. and allows TrajectoryObject to calculate its trajectory from that. If you want to specify an end point, you can callTrajectoryObject.SimulateTrajectory(GameObject originator, Vector3 startPosition, Vector3 endPosition)
.
Since ThrowableItem.LateUpdate is not an overridable method, you may want to create your own subclass (e.g. of GrenadeItem) which calls SimulateTrajectory itself, in a similar way to ThrowableItem.LateUpdate.
SimulateTrajectory is just used for the LineRenderer.
For the actual thrown object's motion, that's controlled by TrajectoryObject, specifically Move. Again this isn't an overrideable method, so you may want to create a custom script to handle movement between pre-defined points A and B.
m_Aiming && m_ShowTrajectoryOnAim
from the if statement) or do something similar in your own custom class, similar to what we talked about before.