toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Can the accelerometer tell you which way the device is being held?
IntelligentDesigner
Member
Posts:
517
May 2010
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
jonmulcahy
Member, Sous Chef
Posts:
10,408
May 2010
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.
IntelligentDesigner
Member
Posts:
517
May 2010
Thanks Mulcahy, so how do I say the rule?
I find only Devices>Accelerometer>(X, Y, Z) in the attribute browser...
jonmulcahy
Member, Sous Chef
Posts:
10,408
May 2010
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
IntelligentDesigner
Member
Posts:
517
May 2010
Ah. Attribute Devices>Screen>DeviceOrientation is
Landscape Left/Right, Portrait
Thanks, Bro!
Sign In
or
Register
to comment.
Comments
device orientation: Landscape left, landscape right, portrait or portrait upside down.
I find only Devices>Accelerometer>(X, Y, Z) in the attribute browser...
If attribute device.Orientation = Landscape
do this
If attribute device.Orientation = Portrait Upsidedown
do this
Landscape Left/Right, Portrait
Thanks, Bro!