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
- GameObject hitObject;
- Renderer hitObjectRenderer;
- Vector3 hitPoint;
- Vector3 hitNormal;
- float hitDistance;
- Vector3 barycentricCoordinate;
- Vector2 textureCoordinates;
- int triangleIndex;
- string drcTag;
- ObjectType hitObjectType;
- 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.
DOCS UNDER CONSTRUCTION …