Hi I’m currently trying to update the transform of my game object with that Vector3.Lerp.
Before trying to implement that Lerp effect my transform scritp was this one :
ship.transform.Translate(Vector3.forward * currentSpeed * Time.deltaTime);
Now I tried this but that not work :
public Vector3 destination;
private void Start()
{
Photonview = GetComponent<PhotonView>();
if (Photonview.isMine)
{
destination = transform.position;
}
}
private void Update()
{
destination += ( Vector3.forward * currentSpeed );
ship.transform.position = Vector3.Lerp( Vector3.forward, destination, 0.5f * Time.deltaTime );
}
Any idea please ?