kill object with thyme ?
6 posts • Page 1 of 1
kill object with thyme ?
how to do it? density = NaN bugs my scene, even when is set collideSet = 0 before killing it...
- pixartist
- Posts: 65
- Joined: Wed Sep 02, 2009 5:30 pm
Re: kill object with thyme ?
Spawn a very small circle with a radius of 0.001 with an onCollide of e.this.killer = true; e.other.killer = true.
- Code: Select all
Scene.addCircle({pos := e.pos; radius := 0.001; onCollide := (e)=>{e.this.killer = true; e.other.killer = true}})
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: kill object with thyme ?
standardtoaster wrote:Spawn a very small circle with a radius of 0.001 with an onCollide of e.this.killer = true; e.other.killer = true.
- Code: Select all
Scene.addCircle({pos := e.pos; radius := 0.001; onCollide := (e)=>{e.this.killer = true; e.other.killer = true}})
that doesnt work very good for a huge amount of collisions
- pixartist
- Posts: 65
- Joined: Wed Sep 02, 2009 5:30 pm
Re: kill object with thyme ?
Then spawn more with different collision layers. Come on, man, try to think of how you can do it differently if this method does not work well for you.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: kill object with thyme ?
- Code: Select all
e.other.denisty = +inf; e.other.collideset = 0; e.other.attraction = 0; e.other.drawborder = false; e.other.color = [0.0, 0.0, 0.0, 0.0]
Won't destroy it but make it mostly non existent, with no real interference shouldn't make too much lag.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: kill object with thyme ?
- Code: Select all
e.other.density = 0; e.this.density = 0
Does that work?
<-- Made with GIMP
-
blahblah200 - Posts: 61
- Joined: Tue Sep 01, 2009 11:33 am
- Location: Somewhere over the rainbow...
6 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 23 guests