DRCS C# Jobs Documentation

This is a collider free system which uses custom RayCast and SphereCast methods to detect objects. It is based on the new C# Job system and Burst compiler for greater performance and it supports Skinned and Rigid (Non-Skinned) meshes.

– NOTE : requires .Net 4 to be selected and Jobs, Burst and Collection packages from the package manager ! 
– Platform support is based on Unity’s support for C# Jobs and Burst compiler and their current state !


  • RayCast and RayCastAll against triangular meshes
  • SphereCast ans SphereCastAll against triangular meshes – useful for simulating (projectiles)
  • OverlapSphere – test against bounds and triangular meshes
  • OverlapBox – test against bounds and triangular meshes
  • Object types: Skinned, Rigid (Non Skinned)
  • Custom LOD Meshes – use them for intersection at distance. This can help greatly improve performance
  • Swap LOD meshes at runtime. This will force the simpler meshes to be rendered at distance
  • Temporarily exclude objects from the system
  • Adding components at runtime
  • Get the closest bone to a hit point – This way you can attach some objects to that bone transform
  • Stick objects to the hit point on Skinned Meshes – Every frame a new position is calculated
  • Mesh Grouping Tool – select and group triangles by tags, i.e. define character’s head with tag “head”
  • Object groups
  • Custom mesh skinning method ( automatically managed )
  • Rich “DRCHitInfo” class filled with information about any intersected object
  1. GameObject  hitObject;
  2. Renderer       hitObjectRenderer;
  3. Vector3          hitPoint;
  4. Vector3          hitNormal;
  5. float               hitDistance;
  6. Vector3          barycentricCoordinate;
  7. Vector2          textureCoordinates;
  8. int                  triangleIndex;
  9. string             drcTag;
  10. ObjectType    hitObjectType;
  11. DRCM            drcmObject;

NOTE : The triangle tag buffers are specified by LOD level and are not initialized initially. if the Mesh Grouping Tool is used specifically for initializing and updating them, The “default” tag is filled in the DRCHitInfo structure in case the buffers are empty.