Industricks

A compilation of usefull things I learned while working in the industry.

VEX

Unstep particles

if (rand(@id+6725)>0.5)
{@P = @P + @v*rand(@id)*ch("scale");}
else
{@P = @P - @v*rand(@id)*ch("scale");}

Find camera position/normal

string camera = chs("camera_path");
@P = ptransform(camera, "space:current", {0,0,0});
@N = ntransform(camera, "space:current", {0,0,-1});

Use the copy number of your node as ID

i@id = atoi(re_replace("name_of_node","",chs("str")));

Use $OS in the parameter str


Convert vector in quaternion

@orient = dihedral(set(0,1,0),@v);

PARAMETERS

Use a parameter of the previous node in a parameter

ch(« ../ » +opinput(« . », 0)+ « /offset ») // change « offset » to desired parameter