@dist = chramp('blend', fit(@P.y, 0, 3, 0, 1));

vector4 extrarot = quaternion(radians(rand(@id+12355)*360),set(0,1,0));
@orient = slerp(@orient, qmultiply(set(0,0,0,1),extrarot), 1-@dist);


// ============ RANDOMLY ROTATE Y AT REST =======================
@dist = chramp('blend', fit(@P.y, 0, 2, 0, 1));
 
vector4 extrarot = quaternion(radians(rand(@id+12355)*360),set(0,1,0))*360;

vector axis = set(0,1,0);
vector4 target = quaternion(axis);
matrix3 m = ident();
float angle = radians(fit01(rand(@id),-360, 360));
rotate(m, angle, axis);
target *= quaternion(m);



@orient = slerp(@orient, target, 1-@dist);