Скрипт используемый в тесте:
Синтаксис:
Используется csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test : MonoBehaviour {
public float x;
public float velocity;
public float smoothTime;
public float y;
void Start () {
}
void Update () {
x = Mathf.SmoothDamp (x, y, ref velocity, smoothTime);
}
}
using System.Collections.Generic;
using UnityEngine;
public class Test : MonoBehaviour {
public float x;
public float velocity;
public float smoothTime;
public float y;
void Start () {
}
void Update () {
x = Mathf.SmoothDamp (x, y, ref velocity, smoothTime);
}
}
Ссылка на видео (изменение параметров отражено в инспекторе):
https://yadi.sk/i/p41946oD3Nh4Fy