OverlapParams
*Pronto este contenido estará disponible en tu idioma seleccionado.
The OverlapParams data type stores parameters for use with WorldRoot boundary-querying functions, in particular WorldRoot:GetPartBoundsInBox(), WorldRoot:GetPartBoundsInRadius() and WorldRoot:GetPartsInPart(). The OverlapParams.FilterDescendantsInstances property stores an array of objects to use as either an inclusion or exclusion list based on the OverlapParams.FilterType enum, and the OverlapParams.CollisionGroup property can specify a collision group for the boundary query operation.
Unlike most data types in Luau, you can change all of the members of OverlapParams without creating a new object, allowing you to reuse the same object repeatedly.
Resumen
Constructores
- new()
Propiedades
An array of objects whose descendants is used in filtering candidates.
Determines how the OverlapParams.FilterDescendantsInstances list is used.
The maximum amount of parts to be returned by the query.
The collision group used for the operation.
Determines whether the boundary-querying operation considers a part's BasePart.CanCollide property value over its BasePart.CanQuery value.
When enabled, the query will ignore all part collision properties and perform a brute-force check on every part.
Métodos
Adds the instances provided to FilterDescendantsInstances.
Constructores
new
Propiedades
FilterDescendantsInstances
An array of objects whose descendants is used in filtering candidates.
FilterType
Determines how the OverlapParams.FilterDescendantsInstances array is used, depending on the Enum.RaycastFilterType provided. Default is Enum.RaycastFilterType.Exclude.
MaxParts
The maximum amount of parts to be returned by the query. The default value of zero (0) represents no limit.
CollisionGroup
Specifies a collision group for the operation. Parts in collision groups that are set to not collide with this group are ignored. If this property is omitted, the operation assumes the Default collision group.
RespectCanCollide
This property, if true, makes the boundary-querying operation use an intersected part's BasePart.CanCollide value in favor of its BasePart.CanQuery value when determining whether that part is included in the array of spatial query results.
BruteForceAllSlow
When enabled, the query will ignore all part collision properties and perform a brute-force check on every part. This will negatively impact performance and should not be used in live experiences.
Métodos
AddToFilter
For efficiency and simplicity, this method is the preferred way to add instances to the filter. It has the additional advantage that it allows FilterDescendantsInstances to be updated from a parallel context.