静态四元数线性插值(四元数从,四元数到,浮动吨);Unity3D四元数libGDX等效
描述: 从和之间插入t,然后对结果进行归一化。 这比斯勒普要快,但如果旋转很远,看起来更糟糕。
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
public Transform from;
public Transform to;
public float speed = 0.1F;
void Update() {
transform.rotation = Quaternion.Lerp(from.rotation, to.rotation, Time.time * speed);
}
}
请问您是否可以在libGDX中写下一个相等数?我试图做很长时间,没有成功。
从描述中,听起来像nlerp。为了得到它,线性插值四元数的每个分量,然后对其进行归一化。 – Tenfour04 2014-11-05 21:21:42