I am watching this (game dev, space parenting & rotation) Sebastian Lague video and found that there are three spaces actually (not two) and these are world space, local space and object space.
- World space: The static space (0,0,0)
- Object space: related to the object space
- Local Space: related to the parent of the object
I am amazed that i didn't find the distinction between these two spaces(local and object) on official unity forms but actually it exists. My question is that why there is no Space.Local? I found that there are Space. Self and Space.World. Space.Self is refer to object space. I can move my object to object space using this
void Update () {
transform.Translate(new Vector3(0,0,1) * Time.deltaTime * 2,Space.Self);
}
And i can move my object to world space using this
void Update () {
transform.Translate(new Vector3(0,0,1) * Time.deltaTime * 2,Space.World);
}
but there is no support for local space that i could move the object to local space (means move the object related to its parent object). There is a fair distinction between Local and Object space but unity didn't consider it i guess or i am wrong.