Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

It is actually quite simple, World Space is a constant vector, for example, X will always be right and left, Z always forward and backward and Y up and down, so an object in world space that is at X = 2 , Y = 0 , Z = 0 will be right or left relative to the world. Now the Local Space refers to the coordinates of the object in relation to itself, rotation for example, which is what I noticed in your game, the character moves in relation to its direction, then the W that is forward, will always be forward of the character, and the D always to the right of the character, then according to his rotation the front will be different, and usually in games with vision Top Down, when you go forward, he goes literally up in relation to the rotation of the camera or the World Space.

In summary, what you have done is in no way wrong, but your character has a Tank movement, similar to old games like Resident Evil, and usually for games with that camera from above, the movement is based on World Space or the Camera, where when the player presses W he actually goes up in relation to the camera, while in your game when pressing W he goes forward in relation to the character.

I don't know if I could explain it right, but that's pretty much it 😅

In Unity there is a button to switch from World/Global Space to Local Space so you understand the difference.


(+1)

Okay ! I didn't know what you were meaning but that was intentional !

We used "Cam.Transform.Forward" instead of "new Vector3(0,0,1)".
We even add more code to cancel the "Local Space" cause when we tried we found it more intuitive but maybe we were wrong :3

Thank's for the reply !

After many friends who tried the game, they all make the same reproach about local and world space !

Big thank's for your comment !

You're welcome :)