How do I Move Object With Tilting?

  • How to move an object by tilting the phone?

    I use Cocoonjs and exported it to APK

    Thanks

  • How to move an object by tilting the phone?

    I use Cocoonjs and exported it to APK

    Thanks

    Choose "Touch" > "Compare Orientation" > Select Orientation "beta" or "gamma" (beta - front to back tilt, gamma - left to right) and set the tilt angle, then just add sprite > move at angle that you need, or where you need to move it.

  • > How to move an object by tilting the phone?

    >

    > I use Cocoonjs and exported it to APK

    >

    > Thanks

    >

    Choose "Touch" > "Compare Orientation" > Select Orientation "beta" or "gamma" (beta - front to back tilt, gamma - left to right) and set the tilt angle, then just add sprite > move at angle that you need, or where you need to move it.

    Btw, is there any way to test tilting on browser?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sorry my english is pretty weak.

    [attachment=0:2wk5i7d3][/attachment:2wk5i7d3]

    Here, i made a little example of that, try to tilt your device left and right, i just try that on cocoonjs 2.0.2.

    Btw, is there any way to test tilting on browser?

    Only if you had accelerometer in your device, i don't know any other way. Maybe someone else know how.

  • Sorry my english is pretty weak.

    [attachment=0:2hxxshqy][/attachment:2hxxshqy]

    Here, i made a little example of that, try to tilt your device left and right, i just try that on cocoonjs 2.0.2.

    It's all right, gonna test your capx and report back soon

  • Sisyphus I compiled it via Cocoonjs and it works very well!

    Thank you very much bro, I owe you one

  • Sisyphus I compiled it via Cocoonjs and it works very well!

    Thank you very much bro, I owe you one

    Glad to help

  • I implemented the tilt function into my game, but it's not working correctly since my game orientation is landscape

    The tilt detector thinks that my game is in portrait orientation

    So how to pass the value as landscape mode?

  • Bump!

  • I implemented the tilt function into my game, but it's not working correctly since my game orientation is landscape

    The tilt detector thinks that my game is in portrait orientation

    So how to pass the value as landscape mode?

    Try different angles on gamma or beta.

  • Still doesn't work

  • Upload a capx example please.

  • ijoin I am running into a similar problem. I can get it to tilt properly in all directions on my phone, but when viewed on my Nexus 10, the controls are rotated 90 degrees. Does anybody know if there is there any way to make the tilt controls universal for all phones and tablets?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)