Can the accelerometer tell you which way the device is being held?

IntelligentDesignerIntelligentDesigner Member Posts: 517
edited November -1 in Working with GS (Mac)
I want to make a set of rules that do things differently depending on the orientation. There must be a way to act on that information...

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    since version 0.8.5 there are rules that know which orientation the device is in:

    device orientation: Landscape left, landscape right, portrait or portrait upside down.
  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    Thanks Mulcahy, so how do I say the rule?

    I find only Devices>Accelerometer>(X, Y, Z) in the attribute browser...
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    I don't have it in front of me, but it's more like

    If attribute device.Orientation = Landscape
    do this

    If attribute device.Orientation = Portrait Upsidedown
    do this
  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    Ah. Attribute Devices>Screen>DeviceOrientation is

    Landscape Left/Right, Portrait

    Thanks, Bro!
Sign In or Register to comment.