Unity Products:Amplify Shader Editor/Object To World

From Amplify Creations Wiki
Revision as of 00:06, 2 December 2023 by AmplifyWiki (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Back to Node List

Object To World Node

The Object To World node transforms a position or direction specified on its Input from Object/Local space to World Space. This node will also return the current game object's actual position on the world if Input is left unconnected and its default internal value of (0,0,0,1) is used.


Nodes used: Object To World



NOTE 1: When connecting a Vector 3 type data into Input, ASE will automatically cast it into a Vector4 type and set its w channel to 0, since it's the cast default behavior across all nodes.
This leads to incorrect results if that vector represents a position since the w channel value is important when doing a positional space transform. On these situations a new w channel with a value 1 should be appended to the original position vector via the Append node and its result should then be used on the Object To World node.

For the inverse World To Object transform please check the World To Object node.

NOTE 2: We advise using either the Transform Position or Transform Direction as they are easier to use and setup all available space transform switch.

Node Parameter Description Default Value
Input Value in object/local space to be transformed into world space. Only visible if the respective input port is not connected. 0,0,0,1
Input Port Description Type
Input Value in object/local space to be transformed into world space. Float4
Output Port Description Type
XYZW Returns the transformed value in world space. Float4
X Returns only the X component of the transformed value in world space. Float
Y Returns only the Y component of the transformed value in world space. Float
Z Returns only the Z component of the transformed value in world space. Float
W Returns only the W component of the transformed value in world space. Float

Back to Node List