"Density = 0" problem.

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

"Density = 0" problem.

Postby savask » Tue Nov 24, 2009 11:27 am

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 :(
Last edited by savask on Tue Nov 24, 2009 4:18 pm, edited 1 time in total.
User avatar
savask
 
Posts: 162
Joined: Mon Oct 12, 2009 2:53 pm
Location: Russia, Siberia

Re: "Density = 0" problem.

Postby Kilinich » Tue Nov 24, 2009 1:21 pm

Yes, it's a phun bug. You can try to use something else like "airFrictionMult = NaN"
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: "Density = 0" problem.

Postby savask » Tue Nov 24, 2009 3:35 pm

"AirFrictionMult = NaN" deletes all unglued objects in the scene.
User avatar
savask
 
Posts: 162
Joined: Mon Oct 12, 2009 2:53 pm
Location: Russia, Siberia

Re: "Density = 0" problem.

Postby standardtoaster » Tue Nov 24, 2009 4:10 pm

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]
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: "Density = 0" problem.

Postby savask » Tue Nov 24, 2009 4:16 pm

I have Phun v5.28, it was my mistake :roll:
Your method are working (but why color = [0,0,0,0]?), thank's!
User avatar
savask
 
Posts: 162
Joined: Mon Oct 12, 2009 2:53 pm
Location: Russia, Siberia

Re: "Density = 0" problem.

Postby standardtoaster » Tue Nov 24, 2009 4:22 pm

It was just a quick solution to make the object invisible. I updated the script.
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.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: "Density = 0" problem.

Postby savask » Tue Nov 24, 2009 4:27 pm

It goes fast, so I think it will better to use only "density = 1e-12" and object will be deleted at the up plane.
User avatar
savask
 
Posts: 162
Joined: Mon Oct 12, 2009 2:53 pm
Location: Russia, Siberia

Re: "Density = 0" problem.

Postby Kilinich » Tue Nov 24, 2009 6:00 pm

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...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: "Density = 0" problem.

Postby savask » Tue Nov 24, 2009 6:06 pm

I said to use only "density = 1e-12" in the oncollide.
User avatar
savask
 
Posts: 162
Joined: Mon Oct 12, 2009 2:53 pm
Location: Russia, Siberia


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 4 guests