accelerometer
Posted:
Tue Jul 20, 2010 1:59 am
by Fojam
how do you use the accelerometer variable? id like to integrate it in one of my games
Re: accelerometer
Posted:
Tue Jul 20, 2010 2:34 am
by jimmynewguy
This demo was in the Beta - akr made it i beleive
Re: accelerometer
Posted:
Tue Jul 20, 2010 1:43 pm
by Fojam
thanks thats exactly what I was looking for
Re: accelerometer
Posted:
Wed Jul 21, 2010 6:35 pm
by makslane
Use the getAccelerometer function to get the value from the accelerometer (on the desktop get the joystick axis values).
Declaration:
- Code: Select all
Vector getAccelerometer()
The Vector is a struct with the follow members:
x: -1.0 to 1.0
y: -1.0 to 1.0
z: -1.0 to 1.0
Syntax:
- Code: Select all
Vector v = getAccelerometer();
x = v.x;
Re: accelerometer
Posted:
Wed Jul 21, 2010 6:51 pm
by DST
The getaccelerometer function works for my joystick in windows, and doesn't require any translation of the variables like joystickaxis does.