修改脚本
This commit is contained in:
23
Assets/Scripts/Demo/SetTransform.cs
Normal file
23
Assets/Scripts/Demo/SetTransform.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class SetTransform : MonoBehaviour
|
||||
{
|
||||
public Vector3 targetPos = new Vector3(0, 0, 0);
|
||||
public Vector3 targetAngles = new Vector3(0, 0, 0);
|
||||
|
||||
public void Start()
|
||||
{
|
||||
targetPos = transform.localPosition;
|
||||
targetAngles = transform.localEulerAngles;
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
transform.localPosition = targetPos;
|
||||
transform.localEulerAngles = targetAngles;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user