Answer the question
In order to leave comments, you need to log in
How to rotate an object around its axis (y)?
Tell me how to rotate an object around the Y axis in Unity3d. There is such a script, but the object rotates diagonally
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RotateEarth : MonoBehaviour
{
[SerializeField] public float speed = 0; // скорость
void Update()
{
transform.Rotate(0, speed * Time.deltaTime, 0); // вращение планеты
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question