How do I make a character rotate to face towards the left if I tilt left or face right when I tilt right. Also important: I AM IN LANDSCAPE MODE. Please help.
Avery [import]uid: 184688 topic_id: 32511 reply_id: 332511[/import]
Hi Avery,
Do you have the accelerometer part working yet? If not, study the sample project located in your local Corona directory: /CoronaSDK/SampleCode/Hardware/Accelerometer1/
For the flipping, you need to scale the character by -1 on the X factor… this, in effect, is like a mirror flip on the horizontal axis.
Best regards,
Brent Sorrentino [import]uid: 9747 topic_id: 32511 reply_id: 129308[/import]
Hi Avery,
Do you have the accelerometer part working yet? If not, study the sample project located in your local Corona directory: /CoronaSDK/SampleCode/Hardware/Accelerometer1/
For the flipping, you need to scale the character by -1 on the X factor… this, in effect, is like a mirror flip on the horizontal axis.
Best regards,
Brent Sorrentino [import]uid: 9747 topic_id: 32511 reply_id: 129308[/import]
Thanks for the reply, yes I have the accelerometer part working. The part I need help on is that I don’t know how to make anything respond to tilt. For example I know how to make him flip but I just don’t know how to do that when I tilt the device.
Avery [import]uid: 184688 topic_id: 32511 reply_id: 129581[/import]
Thanks for the reply, yes I have the accelerometer part working. The part I need help on is that I don’t know how to make anything respond to tilt. For example I know how to make him flip but I just don’t know how to do that when I tilt the device.
Avery [import]uid: 184688 topic_id: 32511 reply_id: 129581[/import]
Hmmm… isn’t this described somewhere in the code for the Accelerometer sample project?
Here are 2 more sample projects you might find useful:
http://mobile.tutsplus.com/tutorials/corona/corona-sdk-accelerometer/
http://corona.techority.com/2010/11/19/control-an-actor-with-the-accelerometer/
Hopefully this will help you figure it out!
Brent
[import]uid: 9747 topic_id: 32511 reply_id: 129620[/import]
Hmmm… isn’t this described somewhere in the code for the Accelerometer sample project?
Here are 2 more sample projects you might find useful:
http://mobile.tutsplus.com/tutorials/corona/corona-sdk-accelerometer/
http://corona.techority.com/2010/11/19/control-an-actor-with-the-accelerometer/
Hopefully this will help you figure it out!
Brent
[import]uid: 9747 topic_id: 32511 reply_id: 129620[/import]