To develop a 3D application for rotating the gaming objects in unity.
Start
Click File -> Scene -> Select the scene -> Save as-> New folder(Scenes)-> File name (Expno1)
Click Hierarchy -> 3DObject -> Cylinder Hierarchy -> 3DObject -> Capsule Hierarchy -> 3DObject -> Text Hierarchy -> Effects -> Particle system
Create a folder in project and name as Materials Material folder -> Create -> Material (Name: Cylinder) Inspector ->Surface Inputs ->BaseMAp (Choose the color) Drag the Cylinder to the plane and release the mouse
Create a folder in project and name as Materials Material folder -> Create -> Material (Name: Capsule) Inspector ->Surface Inputs ->BaseMAp (Choose the color) Drag the Capsule to the plane and release the mouse
Click Hierarchy -> DirectionalLight Inspector -> Change the color to white (255,255,255)
Create a folder name Coding and create a C# file to add the coding in it.
To add our C# Script file to our selected object, click on the C# Script file and drag it to our selected objects in the Hierarchy window nad run the application.
Stop
Ref no = 212221230107
Done by: M.Sowmya
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class text : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.RotateAround(Vector3.right, Vector3.up, 40 * Time.deltaTime);
}
}
Thus the program to rotating an object in unity is verified successfully