void Update()
{
Vector3 newup = transform.position;
RaycastHit hit;
if (Physics.Raycast(transform.position,Vector3.down,out hit))
{
newup.y = (hit.point + Vector3.up * 2.0f).y;
destUp = hit.normal;
}
transform.position = newup;
transform.up = Vector3.Slerp(transform.up, destUp, 5f * Time.deltaTime);
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/325844.html
標籤:其他
上一篇:Python:貪吃蛇小游戲
