Hi! Please help me to write script!!! His idea - camera must sit on ass, and move down on the hill. From one cube, for next cube. I can’t scripting, and will very thanks if somebody help me.
To give you an idea:
using UnityEngine;
using System.Collections;
public class CameraSlide : MonoBehaviour
{
//Drag transforms from editor
public Transform PointA;
public Transform PointB;
//change speed to your needs
public float Speed = 1f;
// Use this for initialization
void Start ()
{
//reset camera position and rotation
transform.position = PointA.position;
transform.rotation = PointA.rotation;
}
// Update is called once per frame
void Update ()
{
//move the camera smoothly from point A to point B
transform.position = Vector3.Lerp(PointA.position, PointB.position, Time.deltaTime * Speed);
}
}
asafsitner, thank you very much!)