How do I increment physics density?

  • [attachment=0:crle22ea][/attachment:crle22ea]

    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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)