Jumpy accelerometer movement

My game uses accelerometer to move the main actor (a rocket) however despite getting close to 60 fps the movement is very jumpy. I put this down to not having a transition but this doesn't seem to have sorted it:

I have tried:

1
2
3
4
5
6
7
8
9
        local yGravity = event.xGravity
                
        transition.to(rocket, {time=17, y = rocket.y - ((yGravity * 2) * 5) })
                
        if rocket.y < 20 then
                rocket.y = 20
        elseif rocket.y > (_H - 20) then
                rocket.y = _H - 20
        end  

Right. I have dramatically improved the frame rate and transitions by doing the following three things:

1) Double checked my accelerometer code against @peachpellen's tutorial (http://techority.com/2010/11/19/control-an-actor-with-the-accelerometer/) and refactored to move movement code out into its out enterframe method at Peach's example implemented
2) Bought the iOS subscription to ensure I am on the latest stable build rather than the trial
3) Ditched the director class in favour of storyboards.

I'm not sure point point 1) made any great difference given what I was trying to achieve but the way my code is organised because of point 3) which was only available having done point 2) has saved me a lot of wasted time.

Hope this helps someone

views:999 update:2012/1/3 13:02:13
corona forums © 2003-2011