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?