Return type |
Description |
int
|
scene.surfaceType.*
All surface types configured in the project-settings 'Scene' panel.
|
int
|
scene.collisionFilter.*
All collision filters configured in the project-settings 'Scene' panel.
|
float4
|
scene.intersect(float3 origin, float3 rayDir, float rayLength[, bool mask, int collisionFilterID])
Issues a scene raycast query at location origin, towards direction rayDir, as far as distance rayLength.
Optional parameter mask is a trace mask, which defaults to true. Passing false will not perform the raycast for this particle, and the return value will be undefined.
Optional parameter collisionFilterID is a collision filter (see scene.collisionFilter), to tell the game-engine which parts of the scene should be tested.
Returns a float4 result containing the intersection normal in its xyz components, and the intersection distance in its w component.
If the ray did not intersect anything, infinity is returned in w.
|
int4
|
scene.intersectExt(float3 origin, float3 rayDir, float rayLength[, bool mask, int collisionFilterID])
Issues a scene raycast query at location origin, towards direction rayDir, as far as distance rayLength.
Optional parameter mask is a trace mask, which defaults to true. Passing false will not perform the raycast for this particle, and the return value will be undefined.
Optional parameter collisionFilterID is a collision filter (see scene.collisionFilter), to tell the game-engine which parts of the scene should be tested.
Returns an int4 result containing packed intersection results.
Use scene.unpackNormal(r), scene.unpackDist(r), and scene.unpackSurfaceType(r) to extract the data.
If the ray did not intersect anything, infinity is returned by scene.unpackDist(r).
|
float4
|
scene.sweepSphere(float3 origin, float3 rayDir, float rayLength, float rayRadius[, bool mask, int collisionFilterID]) [v2.6.0]
Issues a sphere-sweep query at location origin, towards direction rayDir, as far as distance rayLength, with a sphere radius rayRadius.
Optional parameter mask is a trace mask, which defaults to true. Passing false will not perform the sweep for this particle, and the return value will be undefined.
Optional parameter collisionFilterID is a collision filter (see scene.collisionFilter), to tell the game-engine which parts of the scene should be tested.
Returns a float4 result containing the intersection normal in its xyz components, and the intersection distance in its w component.
If the ray did not intersect anything, infinity is returned in w.
|
int4
|
scene.sweepSphereExt(float3 origin, float3 rayDir, float rayLength, float rayRadius[, bool mask, int collisionFilterID]) [v2.6.0]
Issues a sphere-sweep query at location origin, towards direction rayDir, as far as distance rayLength, with a sphere radius rayRadius.
Optional parameter mask is a trace mask, which defaults to true. Passing false will not perform the sweep for this particle, and the return value will be undefined.
Optional parameter collisionFilterID is a collision filter (see scene.collisionFilter), to tell the game-engine which parts of the scene should be tested.
Returns an int4 result containing packed intersection results.
Use scene.unpackNormal(r), scene.unpackDist(r), and scene.unpackSurfaceType(r) to extract the data.
If the ray did not intersect anything, infinity is returned by scene.unpackDist(r).
|
float3
|
scene.unpackNormal(int4 extReport)
Extracts the intersection normal from the int4 result of scene.intersectExt().
Equivalent to scene.intersect(a, b, c, d).xyz
|
float
|
scene.unpackDist(int4 extReport)
Extracts the intersection distance from the int4 result of scene.intersectExt().
Equivalent to scene.intersect(a, b, c, d).w
|
int
|
scene.unpackSurfaceType(int4 extReport)
Extracts the intersection surface type from the int4 result of scene.intersectExt().
The returned surface type can be tested against one of the surface types configured in the project settings (see scene.surfaceType).
|