19 lines
551 B
C#
19 lines
551 B
C#
using BitStrap;
|
|
using UnityEngine;
|
|
|
|
public class TestRotateVector : MonoBehaviour
|
|
{
|
|
public Vector3 rotateVector = Vector3.zero;
|
|
|
|
public Vector3 targetVector = Vector3.zero;
|
|
|
|
[Button]
|
|
public void TestRotate()
|
|
{
|
|
targetVector = Utilities.RotateVector(base.transform.forward, rotateVector);
|
|
Quaternion identity = Quaternion.identity;
|
|
identity = Quaternion.LookRotation(base.transform.position + targetVector.normalized * 5f - base.transform.position);
|
|
base.transform.rotation = Quaternion.Slerp(base.transform.rotation, identity, 666f);
|
|
}
|
|
}
|