Legacy Documentation: Version 2017.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Transform.up

Switch to Manual
public var up: Vector3;

Description

The green axis of the transform in world space.

Manipulate a GameObject’s position on the Y axis (green axis) of the transform in world space. Unlike Vector3.up, Transform.up moves the GameObject while also considering its rotation.

When a GameObject is rotated, the green arrow representing the Y axis of the GameObject also changes direction. Transform.up moves the GameObject in the green arrow’s axis (Y).

For moving the GameObject on the Y axis while ignoring rotation, see Vector3.up.

no example available in JavaScript

Did you find this page useful? Please give it a rating: