Results of collide(sprite1, sprite2)
or overlap(sprite1, sprite2)
.
Body 1 | Body 2 | collide | overlap | embedded | touching.none | overlapX/Y | separation¹ | acceleration¹ |
---|---|---|---|---|---|---|---|---|
sprite.exists=false | false | false | ||||||
enable=false | false | false | ||||||
checkCollision.none=true | false | false | ||||||
immovable=true | true | true | false | ≠ 0 | no | no | ||
moves=false | true | true | false | ≠ 0 | yes | no² | ||
bounce³ is 0 | true | true | false | ≠ 0 | yes | no | ||
delta⁴ is 0 | delta⁴ is 0 | true | true | true | ≠ 0 | no | no | |
[overlap > maxOverlap⁵] | true | false | ≠ 0 | |||||
[overlap > maxOverlap⁵] | false | 0 | no | no | ||||
[all other cases] | true | true | false | ≠ 0 | yes | yes |
- Separation and acceleration happen only via
collide
. Separation means Body 1 is moved outside Body 2. Acceleration means Body 1‘s velocity changes. - The body‘s velocity does change but there is no movement while
body.moves=false
. body.bounce.x
orbody.bounce.y
body.deltaX()
orbody.deltaY()
- maxOverlap is the sum of the two Bodies’ absolute deltas and OVERLAP_BIAS.