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:

[lua] 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 [/lua]

where 17 is approximately transitioned on the fps calculation for debugging and the other I have tried is

[lua]local yGravity = remote.xGravity

rocket.y = rocket.y - ((yGravity * 2) * 2)
print(rocket.y)
if rocket.y < 20 then
rocket.y = 20
elseif rocket.y > (_H - 20) then
rocket.y = _H - 20
end [/lua]

How do I get a smooth transition? Move it to a timer based calculation but my concern on this is making it responsive as the game gets pretty quick [import]uid: 103970 topic_id: 19712 reply_id: 319712[/import]

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 [import]uid: 103970 topic_id: 19712 reply_id: 76506[/import]