Interface IParticleCollision ​
Namespace: ValveResourceFormat.Particles
Assembly: ValveResourceFormat.dll
The world geometry a particle system can trace against, for collision and ground placement. Traces run between any two points: along a particle's movement, or out from a control point to find the surfaces a collision plane set is built from.
public interface IParticleCollisionProperties ​
HasGeometry ​
Whether there is any geometry at all, so a function that needs it can skip its traces.
bool HasGeometry { get; }Property Value ​
bool
None ​
Collision for systems with no world around them: every trace misses.
public static IParticleCollision None { get; }Property Value ​
Methods ​
TraceRay(Vector3, Vector3, out Vector3, out Vector3, out float) ​
Traces a ray from rayStart to rayEnd against the world.
bool TraceRay(Vector3 rayStart, Vector3 rayEnd, out Vector3 position, out Vector3 normal, out float fraction)Parameters ​
rayStart Vector3
Start of the ray.
rayEnd Vector3
End of the ray.
position Vector3
The nearest hit point, or rayEnd on a miss.
normal Vector3
The surface normal at the hit point, facing the ray, or zero on a miss.
fraction float
How far along the ray the hit is, from 0 at its start to 1 at its end, which it is on a miss.
Returns ​
bool
Whether the ray hit anything.

