FollowConstraintContext

FollowConstraintContext

A context used to search for a floor.

Constructor

new FollowConstraintContext()

Source:

Members

allowedMaxDeltaY

The maximum downward delta according to already checked platforms.

(a result of the search)

Source:

allowedMinDeltaY

The minimum upward delta according to already checked platforms.

(a result of the search)

Source:

floorMaxY

The maximum bottom position the character bottom can go.

(constant to a search)

Source:

floorMinY

The maximum top position the character bottom can go.

(constant to a search)

Source:

foundOverHead

True if any edge has been found over where the character top can go (downward).

It allows to check for encompassing platforms.

(local to one hitbox check)

Source:

foundUnderBottom

True if any edge has been found under where the character bottom can go (upward).

It allows to check for encompassing platforms.

(local to one hitbox check)

Source:

headMaxY

The maximum bottom position the character top can go.

(constant to a search)

Source:

headMinY

The maximum top position the character top can go.

(constant to a search)

Source:

ownerMaxX

Character left side

(constant to a search)

Source:

ownerMaxY

Character bottom

(constant to a search)

Source:

ownerMinX

Character right side

(constant to a search)

Source:

ownerMinY

Character top

(constant to a search)

Source:

Methods

addPointConstraint(y)

Check if the character can follow a given Y or move not to touch it and update the context with this new constraint.

Parameters:
Name Type Description
y
Source:

revertTo(previousAllowedMinDeltaY, previousAllowedMaxDeltaY)

Revert the search variables to a given state.

This is used to revert side effect of jumpthru check.

Parameters:
Name Type Description
previousAllowedMinDeltaY
previousAllowedMaxDeltaY
Source: