Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

How to make an object rotate while holding the screen?
Started by sorio.jay Oct 03 2016 06:13 AM

1 reply to this topic
rotate holding
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 2 posts
  • Corona SDK

I'm trying to make a game where i'm controlling an spaceship and avoids asteroids. Now, in order to avoid the asteroids my ship needs to change direction by rotating clockwise or counter clockwise when holding the screen.


Lets say when i hold the right part of the screen, my ship will rotate 0.01 degree clockwise per millisecond and counter clockwise if i hold the left part of the screen.


I'm new to Lua so any ideas is much appreciated. Thanks.  :)

[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Corona Geek

  • 1,733 posts
  • Corona SDK

When you use the term "hold", are you referring to physically touching the screen, or physically tilting the device?