Hi !
I’m trying to transform a Vector3 in VFX Graph from localspace to worldspace, and I’m stumped !
In script or in shadergraph, this would be done by multiplying the vector with the LocalToWorld matrix.
However, VFX graph seems to function differently, and my math-brain is failing me 
Does anyone have an example of how one might use the LocalToWorld VFXGraph node ? Or is there some other node I should be using instead ?
Thanks in advance !
(Sorry if this was already asked elsewhere, I’m finding it hard to navigate the Discussion board.)
Morning. In VFX Graph, you’ve got several operators that allow you to transform your Vector from Local to World or the opposite
.
The simplest operator would be the Change Space:
This operator lets you define an input, its space and the target space.
Note that the cogwheel allows you to change the input type between Vector/Position/Direction.
But you can also Transform operators (Position/vector/Vector4/Direction/Matrix)
Now, let’s take some time to dig further into the subtleties that can be interesting when dealing with vectors and space in VFX Graph.
VFX Graph has multiples vector types, which can be confusing when starting or if you’re not familiar with Vector Math. Let’s list them and underline their specificity:
- Vector3 → No Space / Not normalized.
- Vector → Spaceable / Not normalized.
- Position → Spaceable / Not normalized / represent a Position.
- Direction → Spaceable / Normalized.
-
Choosing Space:
Some blocks or operators need/allow you to define the Space of your input between: Local/World/None:
This allows you to easily change the space like in this example where I’m switching between (0,0,0) world, and (0,0,0) local (VFX instance local position) of the Set Shape Sphere Position block.

If you plug a Not Spaceable type into a port that requires one, you’ll be able to convert it to the desired space. In this example, the Local orientation of my VFX differs from the World as some rotation has been applied to the VFX in the scene. The orientation of my Triangle particles change based on the space of the Axis.
-
None Space:
The None Space means that input will be considered in the same space as the “System Space”.

-
Operator Output Space:
If you wire a type that carries a space, it will be used by the input:
Notice how the Port Space is greyed-out, informing that the space is coming from the input.
-
Output Space Rules:
But what happens to the output space when mixing the input space of an operator?
The Rules could be summarized as:
World > Local > None.
- None + None => None
- Local + None => Local
- Local + World => World
-
Cogwheel options: 
Furthermore, the cogwheel
allows you to change the types of your inputs and their names. This is important and can have implications based on the computation involved. For examples, a direction is always normalized. This
allows you to force the Input type to be interpreted with a defined type. It’s very practical and can spare you some operators/nodes.
These pictures show how input and output types can be converted and some implication that can some input those type conversion can have on the input and/or output results.
-
Space and Subgraphs:
Subgraph block only supports “None” Space.
I hope that this long post will shed some light on the subtleties of spacing and vector type in VFX Graph.
Have a sunny day
.
That was very instructive, thank you so much ! 