Author Topic: include an OrientationSensor, (rotation)  (Read 2523 times)

sparkythex

  • Newbie
  • *
  • Posts: 4
include an OrientationSensor, (rotation)
« on: June 22, 2012, 09:21:54 PM »
I don't see it as an option.
Does or will you include an OrientationSensor, (rotation), in later release?

Use an orientation sensor component to determine the phone's spatial orientation.

An orientation sensor is a non-visible component that reports the following three values, in degrees:
 
■ Roll : 0 degree when the device is level, increasing to 90 degrees as the device is tilted up onto its left side, and decreasing to −90 degrees when the device is tilted up onto its right side.
■ Pitch : 0 degree when the device is level, increasing to 90 degrees as the device is tilted so its top is pointing down, then decreasing to 0 degree as it gets turned over. Similarly, as the device is tilted so its bottom points down, pitch decreases to −90 degrees, then increases to 0 degree as it gets turned all the way over.
■ Azimuth : 0 degree when the top of the device is pointing north, 90 degrees when it is pointing east, 180 degrees when it is pointing south, 270 degrees when it is pointing west, etc.
 
These measurements assume that the device itself is not moving.
Properties
Available
 Indicates whether the orientation sensor is present on the Android device.
Enabled
 If set, the orientation sensor is enabled.
Azimuth
 Returns the azimuth angle of the device.
Pitch
 Returns the pitch angle of the device.
Roll
 Returns the roll angle of the device.
Magnitude
 Returns a number between 0 and 1 that indicates how much the device is tilted. It gives the magnitude of the force that would be felt by a ball rolling on the surface of the device.
Angle
 Returns an angle that tells the direction in which the device is tiled. That is, it tells the direction of the force that would be felt by a ball rolling on the surface of the device.

Events
OrientationChanged(number azimuth, number pitch, number roll)
  Called when the orientation has changed.

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 286
Re: include an OrientationSensor, (rotation)
« Reply #1 on: June 25, 2012, 07:18:07 AM »
Thank you for the details on this, we'll try to get it into this next update also.

Currently it just knows about landscape and portrait orientation but only in relation to screen layout and not about dynamic values.
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

 

anything