J
Jacob Snyder
Guest
Hello,
I am trying to create a system where I can change some of the properties of a physics fixture mid-game. I have read that you have to unbind, change the properties, and then rebind the fixture to do this.
However, each time I do that not only does the desired change not happen, but doing it a bunch of times causes a memory leak. Im doing what the manual very vaguely told me to do, but what am i missing? Here is the code:
the fixture is set up in the create event btw
Thanks!
I am trying to create a system where I can change some of the properties of a physics fixture mid-game. I have read that you have to unbind, change the properties, and then rebind the fixture to do this.
However, each time I do that not only does the desired change not happen, but doing it a bunch of times causes a memory leak. Im doing what the manual very vaguely told me to do, but what am i missing? Here is the code:
GML:
physics_remove_fixture(fix_main,self);
physics_fixture_set_density(fix_main,0); //sets the density to 0 for the chargeup
physics_fixture_bind(fix_main,self);
Thanks!