Unity Products:Amplify Shader Editor/World To Object

From Amplify Creations Wiki
Jump to navigation Jump to search

Back to Node List

World To Object Node

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


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 World To Object node.

For the inverse Object To World transform please check the Object To World 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 World space to be transformed into object/local. Only visible if the respective input port is not connected. 0,0,0,1
Input Port Description Type
Input Value in World space to be transformed into object/local space. Float4
Output Port Description Type
XYZW Returns the transformed value in object/local space. Float4
X Returns only the X component of the transformed value in object/local space. Float
Y Returns only the Y component of the transformed value in object/local space. Float
Z Returns only the Z component of the transformed value in object/local space. Float
W Returns only the W component of the transformed value in object/local space. Float

Back to Node List