Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Rotating an object in Unity

using UnityEngine;

public class Rotation_demo : MonoBehaviour
{
    Vector3 rot=new Vector3(10,10,10);
  
    void Start()
    {
       transform.Rotate(rot);
        
    }
}
Comment

Rotating an object in Unity usign Physics

using UnityEngine;

public class rotation_example : MonoBehaviour
{
    public float torque;
    public Rigidbody rig;

    void Start()
    {
        rig = GetComponent<Rigidbody>();
    }

    void FixedUpdate()
    {
        rig.AddTorque(transform.up * torque);
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: How to print text to screen in c# 
Csharp :: unity DOScale 
Csharp :: C# ValidationAttribute required when 
Csharp :: wpf change foreground c# 
Csharp :: unity rigidbody freeze all rotation 
Csharp :: get all properties of an object including children c# 
Csharp :: #dictionery in c 
Csharp :: c# object is enum 
Csharp :: get gameobject active state 
Csharp :: how to fade c# form 
Csharp :: c# check port in remote pc 
Csharp :: referans tipi nedir c# 
Csharp :: .net mvc foreach index 
Csharp :: wpf keydown detect if control key is down 
Csharp :: wpf binding ancestor codebehind 
Csharp :: c# recorrer una lista 
Csharp :: query parameters sending to controller action asp.net core 
Csharp :: c# listview add items horizontally 
Csharp :: c# clear panel 
Csharp :: .net core get runtime version 
Csharp :: base c# 
Csharp :: c# sbyte 
Csharp :: c# check if character is lowercase 
Csharp :: c# convert bitmap to image 
Csharp :: instantiate object inside of object Unity 
Csharp :: add one to one relationship entity framework 
Csharp :: c# collection of generic classes 
Csharp :: how to add object in dictionary in c# 
Csharp :: How to remove an element from Array List in C#? 
Csharp :: 1180 beecrowd URI 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =