OverlapParams
Overview
Description
The OverlapParams
class is used to configure parameters for spatial computation methods, like overlap or vicinity checking functions. It allows developers to specify filtering criteria, collision properties, and other parameters to refine the results of spatial queries.
Properties
MaxParts
number
Defines the maximum number of parts (or objects) that the overlap operation should return. Setting a limit ensures performance optimization by avoiding the return of an unnecessary large number of results.
Code Samples
BruteForceAllSlow
boolean
Determines whether or not the overlap operation will run with a "brute force" approach, which may be significantly slower but ensures it evaluates all results.
Code Samples
RespectCanCollide
boolean
Specifies whether parts that have the CanCollide
property set to false should be ignored in the overlap operation.
Code Samples
CollisionGroup
string
Filters the overlap results by the specified collision group. Only parts belonging to the given collision group will be considered in the computation.
Code Samples
FilterDescendantsInstances
array
An array of instances to include or exclude during the overlap computation. These instances influence the filtering settings based on the RaycastFilterType
.
Code Samples
RaycastFilterType
Enum.RaycastFilterType
Defines the filtering behavior used in combination with FilterDescendantsInstances
. Valid enumeration values include Blacklist
and Whitelist
.
Code Samples
Constructors
new
Creates a new instance of the OverlapParams
class, which can be configured with the desired properties.
Code Samples
Methods
AddToFilter
Adds additional instances (or an array of instances) into the filtering list for overlap computations. The new instances are appended to the FilterDescendantsInstances
.
Parameters
array
InValue
The instance or array of instances to add to the filter.
Return
OverlapParams
Returns the modified OverlapParams
object for method chaining.
Code Samples
Last updated