Hi, I just met Box2dFlash today!
I'am trying to spread bodies perfectly. Bodies are draggable. I'am trying to achieve distances between bodies to be equally.
I tried this by using the new b2GravityController which seems to work fine. But, I discovered a disadvantage in my program. All bodies (lets say a 100) moved slowly to the boundaries. I gave the 4 walls mass and added them to the GravityController. But since the gravity come's from the center, all bodies moved to the 4 corners as there is the combined gravity the lowest. Is it possible to make gravity not 'come' from the center, but from a side?
I'd set linearDamping on the bodies to damp the moving. I didn't got a stable situation: bodies were always moving slowly. I also tried to change the gravity logic by adding an additional squarre root to minimalize gravity force further away from bodies.
I hope i described what i'am trying to get well. I'am looking forward to some tips of you experts.
I'am trying to spread bodies perfectly. Bodies are draggable. I'am trying to achieve distances between bodies to be equally.
I tried this by using the new b2GravityController which seems to work fine. But, I discovered a disadvantage in my program. All bodies (lets say a 100) moved slowly to the boundaries. I gave the 4 walls mass and added them to the GravityController. But since the gravity come's from the center, all bodies moved to the 4 corners as there is the combined gravity the lowest. Is it possible to make gravity not 'come' from the center, but from a side?
I'd set linearDamping on the bodies to damp the moving. I didn't got a stable situation: bodies were always moving slowly. I also tried to change the gravity logic by adding an additional squarre root to minimalize gravity force further away from bodies.
I hope i described what i'am trying to get well. I'am looking forward to some tips of you experts.