Accelerometer: Difference between revisions
m
no edit summary
(Updated and revisited the page) |
-u ndefined- (talk | contribs) mNo edit summary |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 5: | Line 5: | ||
|output1={{Port|v|Direction}} | |output1={{Port|v|Direction}} | ||
}} | }} | ||
Outputs the tilt direction of the device. | Outputs the tilt direction of the device. | ||
== Notes == | == Notes == | ||
* The accelerometer makes the screen orientation unchangeable during gameplay when the direction output is connected to anything. | * The accelerometer makes the screen orientation unchangeable during gameplay when the direction output is connected to anything. | ||
* The accelerometer is device- | * The accelerometer is device-dependent, meaning it will behave differently on different devices. Some may not even have one at all. | ||
* When the accelerometer is used in a calculation, [[Lock screen orientation|the screen orientation locks]]. | |||
== Examples == | == Examples == | ||
| Line 15: | Line 18: | ||
The accelerometer by itself is very jumpy and not smooth at all, this can be fixed with a LERP script: | The accelerometer by itself is very jumpy and not smooth at all, this can be fixed with a LERP script: | ||
{{Image|Accelerometer LERP.jpg|Smooth accelerometer}} | |||
[[Category:Blocks]] | [[Category:Blocks]] | ||