Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

sorio.jay

[GLOBAL: userInfoPane.html]
sorio.jay
  • 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]
#2

Alex@Panc

[GLOBAL: userInfoPane.html]
Alex@Panc
  • 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?




[topic_controls]
[/topic_controls]