Would appreciate some advice on a couple of different scenarios. My main update loop consists of:
Code: Select all
// Manual Physics Step
for(Movement* manualBody in _manualStep)
{
if(manualBody.active) {
[manualBody manualStep:timeStep];
}
}
// Main Physics Step
[_space step:timeStep];
Code: Select all
CGPoint newPos = ccpAdd(self.body.pos,ccpMult(_velocity,dt));
self.body.vel = cpvmult(cpvsub(newPos,self.body.pos), 1.0f/dt);
self.body.pos = newPos;
Should rogue bodies ideally be of infinite mass (static)? Some of the movement sub classes do things like use a motor to animate rotation so they can not be infinite or it breaks. Should I replace this with manual rotation of angle? (the effect is purely cosmetic, tbh as the fixture is a circle, could get away with simply rotating the sprite, if CCPhysicsSprite didn't over ride it
One thing I did notice, if the body has infinite mass it will not collide with the space boundary? However it still collides fine with everything else, non-infinite works fine with space boundary.