transform.forward refers to world blue axis or local blue axis?

I have a cube rotated in such a way that the local blue axis is pointing upwards (as seen in the translate mode). The world blue axis is pointing into the screen. However, when transform.forward is run, the cube is moving forward along the local blue axis instead of the world blue axis.

According to the docs, translate.forward refer the blue axis of the transform in world space.

Appreciate any help in understanding this.

Thank you.

tranform.forward is in local space.

If you want forward in world space, that’s Vector3.forward.

3 Likes

Thank you Baste.

What does the “blue axis of the transform in world space" refer to in the doc? Seems to be refering to the world space blue axis, which is what confused me.

Probably the blue axis of the transform gizmo you get when you’ve selected the object and are in local space mode.

Yeah, those docs are not very good.