This is big problem with my application because if affects game play significantly.
The problem is not affected by time, i.e. quick or slow adding has the same results. By printing the shape group id I can see that the objects are unique.
Any ideas what is causing this behavior?
Quasi code
Code: Select all
update{
[self.space step:dt];
[self loopObjectArrayAndUpdateGraphics];
}
touchScreen {
@synchronized(self){
// create newObject
[self addObjectToArray: newObject];
[self.space addPostStepCallback:self selector:@selector(addObjectToSpace:) key:newObject];
}
}
addObjectToSpace: (id) object {
[self.space add:object];
}