dacha
    Preparing search index...

    Interface CastActorParams

    The parameters of PhysicsAPI.castActor and the other actor cast methods.

    An actor without a collider finds nothing. An actor with a segment collider finds nothing too.

    Hierarchy (View Summary)

    Index
    actor: Actor

    The actor whose collider moves. The cast starts from its current Transform.

    actorFilter?: (actor: Actor) => boolean

    Gets each actor and returns false to leave it out.

    direction: Vector

    The direction of the cast.

    excludeActors?: Actor[]

    Leaves these actors out.

    excludeSelf?: boolean

    Leaves the actor itself out of the results.

    true

    hitFilter?: (hit: CastHit) => boolean

    Gets each hit and returns false to leave it out.

    The query may reuse the hit object, so it is valid only during the call. Do not keep a reference to it.

    layer?: string

    Finds only colliders whose layer collides with this layer. Without it, the cast uses the layer of the actor's collider.

    maxDistance: number

    How far the cast goes, in world units.

    offset?: Point

    Moves the start of the cast, in world units.