1234567891011121314151617181920 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class RotateMe : MonoBehaviour
- {
- public Vector3 VectorAxes;
- private Rigidbody rig;
- void Start()
- {
- rig = GetComponent<Rigidbody>();
- }
- // Update is called once per frame
- void Update()
- {
- rig.MoveRotation(rig.rotation * Quaternion.Euler(VectorAxes));
- }
- }
|