Hi!
I’ve created this script to rotate a wheel, the problem is that It doesn’t rotates on itself, while I would like so.
This is the script, how can I do to rotate It on itself?
using UnityEngine;
using System.Collections;
public class RideRiesenrad : MonoBehaviour {
public GameObject rad_main;
float rad_rotation;
void Awake()
{
rad_rotation = 0.0f;
}
void Update()
{
if (Input.GetKey(KeyCode.M))
{
int i;
rad_rotation = (rad_rotation + Time.deltaTime * 5.0f) % 360.0f;
rad_main.transform.localEulerAngles = new Vector3 (0.0f, 0.0f, rad_rotation);