Hi,
I'm using Box2D for a game we're developing. I'm trying to add bullets to the world, such that each character has a certain number of bullets. I'm getting an error when the number crosses a limit, as shown in the file attached.

Error.jpg [ 97.15 KiB | Viewed 212 times ]
I read another post on the forum which suggested changing b2_maxProxies in b2Settings.h from 512 to a higher value. I did that and I'm still getting the same error. The number shown changes every time too. In the attachment, it's 373 but I've also seen 446, 449 and 442.
Could someone please tell me what the problem might be? Could it be the way I'm setting the position of the bullets? I'm doing it like this:
b2Vec2 aiPosition = aiCharacters[i]->body->GetPosition();
aiCharacters[i]->projectiles[j]->bodyDef.position.Set(aiPosition.x, aiPosition.y);
The aiCharacters are in random positions in my world (within world boundaries, though).
Any help would be much appreciated.
I'm using Box2D for a game we're developing. I'm trying to add bullets to the world, such that each character has a certain number of bullets. I'm getting an error when the number crosses a limit, as shown in the file attached.
Attachment:
Error.jpg [ 97.15 KiB | Viewed 212 times ]
I read another post on the forum which suggested changing b2_maxProxies in b2Settings.h from 512 to a higher value. I did that and I'm still getting the same error. The number shown changes every time too. In the attachment, it's 373 but I've also seen 446, 449 and 442.
Could someone please tell me what the problem might be? Could it be the way I'm setting the position of the bullets? I'm doing it like this:
b2Vec2 aiPosition = aiCharacters[i]->body->GetPosition();
aiCharacters[i]->projectiles[j]->bodyDef.position.Set(aiPosition.x, aiPosition.y);
The aiCharacters are in random positions in my world (within world boundaries, though).
Any help would be much appreciated.