Rotating in World Space- Game Dev Series 141

Quick guide of rotate an object in world space of Unity.

When rotate an object in Unity, we usually use transform.Rotate(). In this quick tip, I would demonstrate how to rotate an object in world space.

Rotating object

In this tutorial, I would make a box of pistol ammo rotating in the air.

To rotate an object, using transform.Rotate() in Update().

Inside transform.Rotate(), we need to assign which axis that we would like to rotate. Then multiply it to deltaTime.

So far, this would be the basic way to rotate an object in Local space.

World space

It would be very simple to rotate in world space. We simply add another parameter.

Add another parameter to it: Space.World.

That should make your object rotate in world space, just like my pistol ammo.

--

--

--

A passionate gamer whose goal is to work in video game development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

{UPDATE} Ice Princess Dress Up Designer Hack Free Resources Generator

Top web frameworks in 2020

MSB4057: Sometimes They Come Back… Again

Getting Started with LabArchives Widgets

Co-Laborations, The Great Discord Migration & Params, Params, Params

HackerRank

What to Select? Staff Augmentation Vs Managed Services

LinkIT Monthly Newsletter 1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
S.J. Jason Liu

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.

More from Medium

Unity Interface Layout

Starting To Feel Like A Real Game

Ease of Building UI Elements in Unity

Cinematography in Unity — Skyboxes