rabidus-test/Assets/Scripts/ObjectRotate.cs

16 lines
321 B
C#
Raw Normal View History

2023-07-24 16:38:13 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectRotate : MonoBehaviour
{
2023-11-07 11:16:31 +03:00
[SerializeField] private Vector3 _vector;
[SerializeField] private float _speed = 10;
2023-07-24 16:38:13 +03:00
private void Update()
{
2023-11-07 11:16:31 +03:00
transform.Rotate(_vector * _speed * Time.deltaTime);
2023-07-24 16:38:13 +03:00
}
}