"Density = 0" problem.
9 posts • Page 1 of 1
"Density = 0" problem.
When I'm trying to use this oncollide script: "(e)=>{density = 0}", application crashes. I can change density to 0 by myself in the script menu, and it works fine.
I'm using Phun v5.28 on Windows SP 3.
And, yes, I tried to delete the config file, this doesn't help
I'm using Phun v5.28 on Windows SP 3.
And, yes, I tried to delete the config file, this doesn't help
Last edited by savask on Tue Nov 24, 2009 4:18 pm, edited 1 time in total.
-

savask - Posts: 162
- Joined: Mon Oct 12, 2009 2:53 pm
- Location: Russia, Siberia
Re: "Density = 0" problem.
Yes, it's a phun bug. You can try to use something else like "airFrictionMult = NaN"
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: "Density = 0" problem.
"AirFrictionMult = NaN" deletes all unglued objects in the scene.
-

savask - Posts: 162
- Joined: Mon Oct 12, 2009 2:53 pm
- Location: Russia, Siberia
Re: "Density = 0" problem.
Two things. I suggest that you update to Phun v. 5.28. The second thing is that you can try using this:
- Code: Select all
e.this.density = 0.000000000001; e.this.collideSet = 0; e.other.color = [0, 0, 0, 0]
-

standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: "Density = 0" problem.
I have Phun v5.28, it was my mistake
Your method are working (but why color = [0,0,0,0]?), thank's!
Your method are working (but why color = [0,0,0,0]?), thank's!
-

savask - Posts: 162
- Joined: Mon Oct 12, 2009 2:53 pm
- Location: Russia, Siberia
Re: "Density = 0" problem.
It was just a quick solution to make the object invisible. I updated the script.
NOTE: I have not tested any of these scripts. So, I don't know how fast the object goes up. I only added the color, drawBorder, and drawCake to make it completely invisible.
- Code: Select all
e.this.density = 0.0000000001; e.this.collideSet = 0; e.this.color = [0, 0, 0, 0]; e.this.drawBorder = false; e.this.drawCake = false
NOTE: I have not tested any of these scripts. So, I don't know how fast the object goes up. I only added the color, drawBorder, and drawCake to make it completely invisible.
-

standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: "Density = 0" problem.
It goes fast, so I think it will better to use only "density = 1e-12" and object will be deleted at the up plane.
-

savask - Posts: 162
- Joined: Mon Oct 12, 2009 2:53 pm
- Location: Russia, Siberia
Re: "Density = 0" problem.
savask wrote:It goes fast, so I think it will better to use only "density = 1e-12" and object will be deleted at the up plane.
It will not be deleted by up plane because you set collideSet to zero...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: "Density = 0" problem.
I said to use only "density = 1e-12" in the oncollide.
-

savask - Posts: 162
- Joined: Mon Oct 12, 2009 2:53 pm
- Location: Russia, Siberia
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests



