Class b2RayCastInput

Ray cast input data.

Index

Constructor methods

Properties

Constructor methods

constructor(p1?: b2Vec2, p2?: b2Vec2, maxFraction?: number): b2RayCastInput

Creates a new ray cast input.

Parameters

  • p1?: b2Vec2 optional

    Start point of the ray, default = null.

  • p2?: b2Vec2 optional

    End point of the ray, default = null.

  • maxFraction?: number optional

    Truncate the ray to reach up to this fraction from p1 to p2.

Returns

b2RayCastInput

Properties

public maxFraction: number

Truncate the ray to reach up to this fraction from p1 to p2

public p1: b2Vec2

The start point of the ray.

public p2: b2Vec2

The end point of the ray.