Local Space Vs. World Space in Unity

Objective: Briefly explain the difference between Local and World Space

In the scene above, we have a floor and two objects on top. When working in Unity, objects are in a position of space. That space can be seen in two ways, Local and World.

When you place an object in the scene, that object is in a relative space to the scene or the world space. Take the capsule(purple player object) and below we see the transform position of that Player.

If the position is reset the player will be positioned using the world space and end up in the center of the floor as seen below.

The X position being reset places him in the center of the board and the Y position being reset places him inside the board. This is world space related.

If we make the Player a child object of the box on the right, the Player is now working in local space, space related to that box. After setting the Player as a child object, we add the same position values as before. Notice now though that the Player even with the same scale as previously is now bigger and higher off the floor as we are using the scale and positioning relative to the box.

If we reset the positions X and Y values we don’t end up in the floor anymore. We now end up inside the box.





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

Recommended from Medium

BA Journal — Tuesday 09.01.18

Alternate International Competitions

Can Planets and Stars Influence People’s Lives?

What is spaceX’s plans for mars?

The Brighter Side of COVID-19, A Photo Essay

Why Nuclear Bombs Are Much Less Efficient When They Explode in Space

How to Stop a Solar Storm

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
Simon Leen

Simon Leen


More from Medium

Scripting our greybox prototype

Camera Shake in Unity

Max Ammo Functionality — The Ability to Adjust a Max Bound

Realtime, Mixed and Baked Light Modes — For Static & Dynamic Game Objects in Unity