API reference
API reference
Select your platform
No SDKs available
No versions available

HitTester Class

Static Member Functions

Performs an intersection test between the projectile and set of candidates and returns the best intersection result based on the defined comparer .
Parameters
projectile
The projectile to cast against the set of interactables.
candidates
The set of objects that can be "hit" by the projectile .
hitTestImpl
The hit test implementation used to determine if a candidate is intersected by the given projectile .
comparer
The compare implementation used to determine which of two given results is a "better" or "higher priority" result. This is how the results are sorted.
bestResult
The first result in the sorted list of intersected candidates, if it exists.
Returns
True if one or more candidates is intersected by the projectile .
Performs a hit-test with the provided projectile against the given set of candidates and returns the results sorted based on the defined comparer .
Parameters
projectile
The projectile shape (e.g. cone) to cast.
candidates
The set of objects to hit test.
hitTest
The hit-test implementation used to determine if the candidate is intersected by the given projectile .
resultsToPopulate
The list to populate with the sorted results.
comparer
The compare implementation used to determine which of two given results is a "better" or "higher priority" result. This is how the results are sorted.
Did you find this page helpful?