How do I increment physics density?

Get help using Construct 2

Post » Tue Jun 17, 2014 3:46 pm


So I am trying to change the density of an object on the fly (increment it) when it is below a certain coordinate When this is triggered the object just stops moving! Debug shows the density increasing but with a long decimal number; It also shows VelocityX doing something strange. It goes up then starts approaching 0 (but never reaching it). It also seems to glitch collisions even though the sprite appears to be there.

If I change density manually in the debug window it does not do this. Also, if I remove the reference to the previous density it also does not do this. I think I will have to use a global variable to get around this.

Has anyone else experienced this?
You do not have the required permissions to view the files attached to this post.
Posts: 10
Reputation: 250

Post » Thu Jun 19, 2014 5:13 am

I don't know what is the game design but if i were you would use force with angle instead of density! for increment and decrement.
Every Game is a Good Game it's just few people like and few does not! Keep coding people some day you will be a "NOTCH".
Posts: 85
Reputation: 4,607

Post » Thu Jun 19, 2014 6:11 am

Update: I solved this bug by doing every X seconds instead of every tick. It must have been changing too fast and messing with the mass calculation or something.
Posts: 10
Reputation: 250

Return to How do I....?

Who is online

Users browsing this forum: jatin1726 and 26 guests