Last updated
Last updated
The RaycastParams
object is used to configure the behavior and filtering of raycasting functions in Lua. It allows developers to specify options such as ignoring specific objects, setting collision groups, and filtering based on custom rules.
array
Defines a list of instances whose descendants should be ignored or included by the raycast, depending on the FilterType
property.
Enum.RaycastFilterType
Specifies whether the instances in FilterDescendantsInstances
should be included or excluded. Valid values are Whitelist
or Blacklist
.
boolean
Determines whether the raycast should ignore water. If set to true
, water will not block or interact with the ray.
string
Specifies the collision group for the raycast. This allows filtering based on predefined collision group rules.
boolean
Indicates whether the raycast should respect the CanCollide
property of objects. If false
, non-collidable objects can still interact with the ray.
boolean
If set to true
, all objects in the workspace will be checked during the raycast, which can be computationally expensive. This is generally used for debugging or exhaustive collision checks.
Creates a new RaycastParams
object with default values.
Adds one or more instances to the FilterDescendantsInstances
property.
RaycastParams
A new RaycastParams.
Instance|array
InValue
The instance(s) to add to the filter.
RaycastParams
Returns the updated `RaycastParams` object.