Difference between revisions of "ReactToAccelerometer"
From Headbone Creative
(Initial page, includes API information and categories) |
(Updating API info) |
||
Line 1: | Line 1: | ||
− | This script controls the position of the object it is attached to, relative to its starting position. It | + | This script controls the position of the object it is attached to using the device's [http://docs.unity3d.com/Documentation/ScriptReference/Input-acceleration.html acceleration], relative to its starting position. It is completely configurable how the input from the accelerometer is mapped on to the position of the object. |
== Public Variables == | == Public Variables == | ||
− | === | + | === xInputMapping : InputAxis === |
− | + | This tells the script how to map the input from the accelerator onto the x axis. | |
− | === | + | === xInputModifier : float === |
+ | This multiplier is applied to the input on the x axis. | ||
+ | === yInputMapping : InputAxis === | ||
+ | This tells the script how to map the input from the accelerator onto the y axis. | ||
+ | === xInputModifier : float === | ||
+ | This multiplier is applied to the input on the y axis. | ||
+ | === zInputMapping : InputAxis === | ||
+ | This tells the script how to map the input from the accelerator onto the z axis. | ||
+ | === zInputModifier : float === | ||
+ | This multiplier is applied to the input on the z axis. | ||
+ | === lerpSpeed : float === | ||
This is how fast the object will move in the scene. | This is how fast the object will move in the scene. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Latest revision as of 04:25, 18 April 2013
This script controls the position of the object it is attached to using the device's acceleration, relative to its starting position. It is completely configurable how the input from the accelerometer is mapped on to the position of the object.
Contents |
[edit] Public Variables
[edit] xInputMapping : InputAxis
This tells the script how to map the input from the accelerator onto the x axis.
[edit] xInputModifier : float
This multiplier is applied to the input on the x axis.
[edit] yInputMapping : InputAxis
This tells the script how to map the input from the accelerator onto the y axis.
[edit] xInputModifier : float
This multiplier is applied to the input on the y axis.
[edit] zInputMapping : InputAxis
This tells the script how to map the input from the accelerator onto the z axis.
[edit] zInputModifier : float
This multiplier is applied to the input on the z axis.
[edit] lerpSpeed : float
This is how fast the object will move in the scene.