opened
joshlory
username_0
Match the behavior here: https://github.com/molleindustria/p5.play/blob/42cd19c39f6f508e4a73c20eaaeb490b97022840/lib/p5.play.js#L2227
Don't register collisions with destroyed sprites
issue
created
joshlory
username_0
1. Sample repro.  Presumably this should be false, since sprite `a` was destroyed?
```js
var a = createSprite(100, 100);
var b = createSprite(100, 100);
a.destroy();
b.isTouching(a);
```
2. It looks like [yes](https://github.com/code-dot-org/p5.play/blob/b7f63bd64e96d82e23942f42d00a8115420b7766/lib/p5.play.js#L2226-L2227).  I'll create a PR there to update.
3. Good call, I'll add.
comment
created
islemaster
username_1
It's tempting to say your example 1 is user error, since they haven't released their reference to the 'destroyed' sprite... I'd almost expect this to throw on line 4.  But agreed that what you've described is what we should do, it actually seems most intuitive to a student.
comment