Hey, I'm programing with the iOS iphone port, but I thought id ask it here because its not really iOS related...
I have a whole number of blocks in my b2world, they are all moveable by the user with their finger whilst simulating on the iphone.
When the figure touches a block, the program moves the sprite and the update method moves the b2body. This is switched by the isMoving flag:
block1.isMoving == NO:
B2body (Master), Sprite/Image(Slave)
block1.isMoving == YES; (figure it onscreen touching a block)
Sprite(Master), b2body(Slave).
This works well. But I want to remove the dynamic-ness of all other objects whilst this particular block.isMoving == YES. Because when the sprite is the master, I can use my finger and bump it into other objects and move them out of the way, even if their density is equal to 9999.
Is it possible, to change the bodytype mid simulation?
If not (which i suspect), is there any other way or method to do this?
I have a whole number of blocks in my b2world, they are all moveable by the user with their finger whilst simulating on the iphone.
When the figure touches a block, the program moves the sprite and the update method moves the b2body. This is switched by the isMoving flag:
block1.isMoving == NO:
B2body (Master), Sprite/Image(Slave)
block1.isMoving == YES; (figure it onscreen touching a block)
Sprite(Master), b2body(Slave).
This works well. But I want to remove the dynamic-ness of all other objects whilst this particular block.isMoving == YES. Because when the sprite is the master, I can use my finger and bump it into other objects and move them out of the way, even if their density is equal to 9999.
Is it possible, to change the bodytype mid simulation?
If not (which i suspect), is there any other way or method to do this?