Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Rotation

using System.Collections.Generic;
using UnityEngine;

public class orbit : MonoBehaviour
{
    public Transform world;
    public float rotationSpeed=1f;
    // Start is called before the first frame update
    void Start()
    {
        world = GetComponent<Transform>();
        
        
        Debug.Log("this works on the first frame");
    }

    // Update is called once per frame
    void Update()
    {
        //code for rotating the earth
        world.Rotate(new Vector3(0, rotationSpeed, 0), Space.World);
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to access asp button of gridview 
Csharp :: c# linq select specific columns 
Csharp :: c# get smallest of 3 numbers 
Csharp :: checkbox in c# 
Csharp :: c# access substring 
Csharp :: check if two timespans intersect c# 
Csharp :: setting the parent of a transform which resides in a prefab 
Csharp :: C# Convert 1 range to another 
Csharp :: push c# array 
Csharp :: kendo validator tries to validate hidden fields 
Csharp :: unity dropdown 
Csharp :: C# Calculate MD5 Checksum For A File 
Csharp :: c sharp convert string time into 24 hours time 
Csharp :: Convert DataTable to excel file c# using epplus 
Csharp :: unity DOScale 
Csharp :: c# calculate checksum of file 
Csharp :: how to print to printer in c# 
Csharp :: linear search algorithm c# 
Csharp :: get first number in string C# 
Csharp :: sort array dotnet 
Csharp :: c# double without exponential notation 
Csharp :: c# get executing file name 
Csharp :: dapper get list 
Csharp :: c# temporary files 
Csharp :: how to check if button is pressed unity 
Csharp :: C# Async Function simple 
Csharp :: unity interface 
Csharp :: create enum from int c# 
Csharp :: c# template strings 
Csharp :: strong email validation regex c# 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =