public static void AddToObject(GameObject where, Vector3 destination, Quaternion rotation)
    {
        Destroy(where.GetComponent <MoveToObjectSmooth>());

        MoveToObjectSmooth smooth = where.AddComponent <MoveToObjectSmooth>();

        smooth.destinationPostition = destination;
        smooth.destinationRotation  = rotation;
    }
Exemplo n.º 2
0
 public void OnButtonPressed()
 {
     MoveToObjectSmooth.AddToObject(movingObject, cameraPoint.transform.position, cameraPoint.transform.rotation);
 }