rd42
1
I'm trying to add the accelerometer value and collect the up but keep getting this error:
Operator '+' cannot be used with a left hand side of type 'float' and a right hand side of type 'object'
Do I need to cast something?
y = iPhoneInput.acceleration.z + y;
qJake
2
What programming language are you using? You can't just do "y = something", you have to instantiate your variable first.
// C#
float y;
y += iPhoneInput.acceleration.z;
// JS
var y : float;
y += iPhoneInput.acceleration.z;
If you're accumulating your variable, you might also want to make your "y" variable a global variable inside your class.