API Docs for:
Show:

WallJumping Class

A component class that adds the ability to jump off of walls while in the air.

Constructor

WallJumping

(
  • wallJumpRightImpulseX
  • wallJumpRightImpulseY
  • wallDetectorRightRay
)

Parameters:

  • wallJumpRightImpulseX Number

    The x component of the wall jump impulse. This impulse is for jumping off of walls detected on the left side, the opposite variant is calculated automatically.

  • wallJumpRightImpulseY Number

    The y component of the wall jump impulse. This impulse is for jumping off of walls detected on the left side, the opposite variant is calculated automatically.

  • wallDetectorRightRay Ray

    A ray that will be used to detect walls. The beginning position of the ray should be defined relatively to the position of the entity. The ray is for detecting walls on the right side, the left variant is calculated automatically.

Methods

getWallDetectorRightRay

() Ray | Null

Returns:

Ray | Null: A direct reference to the ray object. If a ray was not set, returns null.

getWallJumpRightImpulse

(
  • vector
)

Parameters:

  • vector Vector2D

    Vector to which the impulse will be copied.

setWallDetectorRightRay

(
  • wallDetectorRightRay
)

Parameters:

  • wallDetectorRightRay Ray

    A ray that will be used to detect walls. The beginning position of the ray should be defined relatively to the position of the entity. The ray is for detecting walls on the right side, the left variant is calculated automatically.

setWallJumpRightImpulse

(
  • x
  • y
)

Parameters:

  • x Number

    The x component of the wall jump impulse. This impulse is for jumping off of walls detected on the left side, the opposite variant is calculated automatically.

  • y Number

    The y component of the wall jump impulse. This impulse is for jumping off of walls detected on the left side, the opposite variant is calculated automatically.