07-21-2012 10:14 AM
I've just been writing the UI for a game
On the PlayBook it works perfectly
On BB10 it functions completely differently
My x-axis sense needs the device to be turned far further to hit the same numbers so I can trigger an action
Any ideas?
07-23-2012 04:01 PM
Does default orientation have anything to do with it? Are the axes on the PlayBook different than that of the BB10 Dev Alpha due to each of them having different default orientations (PB landscape vs. BB10DA portrait)?
Or is what you are seeing more subtle, yet distinguishable, than that?
08-02-2012 04:55 AM
Hi everybody.
I also tried to work with the devicemotion and deviceorientation events to move events using WebGL animationFrame. Referring to http://www.html5rocks.com/en/tutorials/device/orie
08-02-2012 05:08 AM
If holding the device in front of you...
X = Tip it left / right
Y = Tip it toward / away from you
I use a big change in the Y reading to trigger an action (jump / crouch in my little test)
This gives a nice simple uncluttered UI - tilt left/right to move, rapid flip forward/back to jump/crouch leaving touch free for fire
It all works very nicely on the PB but is wierd on the DevAlpha
08-02-2012 05:52 AM
peardox wrote:If holding the device in front of you...
X = Tip it left / right
Y = Tip it toward / away from you
I use a big change in the Y reading to trigger an action (jump / crouch in my little test)
This gives a nice simple uncluttered UI - tilt left/right to move, rapid flip forward/back to jump/crouch leaving touch free for fire
It all works very nicely on the PB but is wierd on the DevAlpha
1.) When holding the device in my hands and Y (lock-button is "0") and X (volume-buttons are right) would be 0, then:
1.a) if I move it in this way that lock-button is top now the Y is way round as my objects on screen flying to the top, not falling down to the bottom.
1.b) back to 1.) and then if I move it in this way the volume-buttons are top now the objects are falling from right to left on the display as I would expect it to work.
So for me the Y values are false, they should be the way round as they are thrown in the event. That is how I understand the way X +Y are positioned in the pictures here: http://www.html5rocks.com/en/tutorials/device/orie
08-02-2012 06:08 AM
A very useful tool app can be found in https://github.com/blackberry/WebWorks-Samples
Just compile up Kitchen Sink
I did a PB version and installed it on both PB and DevAlpha
In the 3rd section there's an accelerometer test which is very useful for experimentation
08-02-2012 07:12 AM - edited 08-02-2012 07:13 AM
peardox wrote:A very useful tool app can be found in https://github.com/blackberry/WebWorks-Samples
Just compile up Kitchen Sink
I did a PB version and installed it on both PB and DevAlpha
In the 3rd section there's an accelerometer test which is very useful for experimentation
So I think I need to explain little deeper how it seems to work for me and what the issue is in Relationship to the following image I created from the BB sources (please don't beat me!!)
This shows the device acceleration on the devices and for me the Y values thrown by the event on the BB10 are exactly the opposite direction as shown above in the image.
08-02-2012 08:00 AM
peardox wrote:A very useful tool app can be found in https://github.com/blackberry/WebWorks-Samples
Just compile up Kitchen Sink
I did a PB version and installed it on both PB and DevAlpha
In the 3rd section there's an accelerometer test which is very useful for experimentation
I tried again with the example you linked me to and for me it seems to work well now on both devices PB and BB10 and I investigated and assume that my physics example was made with a bottle of beer.