I have a RaySOP that is doing exactly what I want. It is shooting rays per point along a direction defined by point attribute 'rdir' and is returning the hitprims I'd expect. Hitprims are the green numbers in the images below, yellow lines are visualisation of attribute 'rdir' (raySop shown below)
I want to be better about doing things with VEX so I tried doing the same thing with the same set of points, with the same 'rdir' attribute and same collision geo. I get wildly different results for my hitprims as shown below.
heres the tiny bit of VEX I've got:
vector p;
vector hitprimuvw;
vector dir = @rdir;
int hitted;
hitted = intersect(1, @P, dir, p, hitprimuvw);
@hitprim = hitted;
What am I missing?