ladder physics javascript code example
Example: ladder physics javascript
if (this.x < subject.x + subject.width && this.x + this.width > subject.x && this.y < subject.y + subject.height && this.y + this.height > subject.y)
{
this.canFall = false;
} else
{
this.canFall = true;
}