IPad Platform Game

0 favourites
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Well I assumed touch.gamma returns some angle (so up to 360 and down as -360) but I might be wrong.

    Your best bet is to display the value touch.gamma to check how it works. (it's maybe only returning a 1 -1 range)

    Every tick set your text to touch.gamma.

    From there test it and understand the results/returned values.

    Than adapt the checking of the value (if touch.gamma is in the range of certain values, it means the device is tilting to the right, other set of values tilting to the left, etc...)

    The fact that toggling the test makes the actions executed means that this test never returns true. So there's something with the test itself and or it's values range.

  • All I get is 0 so that tells me its not picking up the tilting.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Apparently yes.

    I quickly tested this capx exported and executed in safari on iPad2.

    It gives results, but the orientation of the displayer image is pretty strange. it's like the tilt right/left and front/back are somewhat inversed.

    Nevertheless, I get values, other than 0.

    Possible indeed that HTML5 doesn't registers the value from the device orientation on your current pad.

  • Apparently so because I still get 0 on 1st generation iPad.

    Id like to see the results on the iPad 2 so hopefully I can get a hold of one today and see the outcome.

    Not sure what to do next? Is there any other option...

  • Hi Kyatric,

    Turns out the 1st generation iPad does not support orientation which would explain the reason why it doesn't work but orientation is supported on iPad 2. iPad 1st gen only supports motion which can be used like orientation but not that well.

  • I tested Kyatric's Tilt_example2 Capx on a Nexus 7 using chrome and get the same inversed controls. (R138.2)

  • Yes, Kyatric's example works well in my HTC EVO 3D, but in different browser it gets different result.

    In chrome, if beta<0, sprite will up, else down. If gamma<0, sprite will right, else left.

    But In FF, beta will inverse, greater than 0, sprite will up, else down. Gamma works same as chrome.

    (C2 R141, Chrome 28.0.1500.94, Firefox 21.0, Android 4.0.3)

  • btw, either chrome or firefox often crashes when run this demo. It seems like these browers haven't fully prepared for orientation app.

    Oh, excuse my poor english. <img src="smileys/smiley17.gif" border="0" align="middle" />

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