Question about item 1 and item 2 on accelerometer
Posted: Wed Apr 16, 2014 2:05 pm
Hi all.
So i was watching the video lesson on how to use the accelerometer.
I can't understand what the item 1 and item 2 of the Loc is.
add (pX * kSensitivity) to item 1 of theLoc
subtract (pY * kSensitivity) from item 2 of theLoc
if item 1 of theLoc < 0 then put 0 into item 1 of theLoc
if item 1 of theLoc > the width of this card then put the width of this card into item 1 of theLoc
put max(0, item 2 of theLoc) into item 2 of theLoc
put min(item 2 of theLoc, the height of this card) into item 2 of theLoc
Is it the pX and Py or something else ?
So i was watching the video lesson on how to use the accelerometer.
I can't understand what the item 1 and item 2 of the Loc is.
add (pX * kSensitivity) to item 1 of theLoc
subtract (pY * kSensitivity) from item 2 of theLoc
if item 1 of theLoc < 0 then put 0 into item 1 of theLoc
if item 1 of theLoc > the width of this card then put the width of this card into item 1 of theLoc
put max(0, item 2 of theLoc) into item 2 of theLoc
put min(item 2 of theLoc, the height of this card) into item 2 of theLoc
Is it the pX and Py or something else ?