iphone - Memory Usage Test -
i trying see how real memory application using. application uses acceleometer input, when click "profile" in xcode 4 runs smoothly until application starts up. accelerometer doesn't work correctly. device supports landscape right , when tilt device ball moves up, if tilt other way ball doesn't move.
when build , run game works perfectly.
- (void)accelerometer:(uiaccelerometer *)accelerometer didaccelerate:(uiacceleration *)acceleration { #define kfilteringfactor 0.1f uiaccelerationvalue rollingx, rollingy; rollingx = (acceleration.x * kfilteringfactor) + (rollingx * (1.0 - kfilteringfactor)); rollingy = (acceleration.y * kfilteringfactor) + (rollingy * (1.0 - kfilteringfactor)); float accelx = acceleration.x - rollingx; float accely = acceleration.y - rollingy; b2vec2 gravity(-accely * 3, accelx * 3); _world->setgravity(gravity); }
any ideas?
also different, i'm using cocos2d build application , i've added ball sprite. can't change ball sprite... i've removed original image resources folder , added different 1 same name image never changes.
anyone know why?
if mean stops working when profiling yes, happen!
profiling adds large overhead code , accelerometer handler wants happen regularly , - profiling stops!
i wouldn't worry if works fine in normal build.
and ball sprite might cached on device - have tried both deleting app iphone , cleaning , rebuilding in xcode?
Comments
Post a Comment