using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TransformTest : MonoBehaviour
{
void Start()
{
SetPosAnRotation(new Vector3(10, 10, 10), new Vector3(10, 10, 10), transform);
}
//使用欧拉角设置物体transform四元数旋转
void SetPosAnRotation(Vector3 position,Vector3 rotation,Transform trans)
{
Quaternion q = Quaternion.Euler(new Vector3(10, 10, 10));
Vector3 v3 = new Vector3(10, 10, 10);
trans.SetPositionAndRotation(v3, q);
}
}
版权声明:本文为Fanstasic原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。