mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-22 23:28:43 -05:00
25 lines
530 B
C#
25 lines
530 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
using UnityEngine.XR.Content.Interaction;
|
|
|
|
public class RotateTarget : MonoBehaviour
|
|
{
|
|
[SerializeField] private Transform target;
|
|
|
|
[SerializeField] private float speed = 10f;
|
|
|
|
[SerializeField] private Vector3 rotationAxis = Vector3.right;
|
|
|
|
public void Rotate(float amount)
|
|
{
|
|
amount *= Time.deltaTime;
|
|
|
|
amount *= speed;
|
|
|
|
target.Rotate(rotationAxis,amount);
|
|
}
|
|
}
|