[Sidefx-houdini-list] tracing, raycasting in pointwrangle? VEX

Martijn Grootendorst martinuz at gmail.com
Wed Jan 25 10:21:50 EST 2017


Hi all,

I'm trying to determine if a point is near a primitive but only in the
direction of it's negative normal.

so what I thought of using is rayhittest or trace, where you can cast a ray
from a point in a direction and it will return a float with the found
distance (or less than zero if no hit)

but I'm getting a 'undefined function' error when i use the following code
in a pointwrangle.

float raylength = 2.0;
float bias = 1.0;
vector pHit, nHit;

float hitDistance = rayhittest(@P, @N*raylength, pHit, nHit, bias);


so I guess this only works in rendering or shading context?

is there an alternative to use in a pointwrangle?

thanks



More information about the Sidefx-houdini-list mailing list