Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/britzl/defold-gyro
Gyroscope extension for the Defold game engine
https://github.com/britzl/defold-gyro
defold defold-library
Last synced: about 16 hours ago
JSON representation
Gyroscope extension for the Defold game engine
- Host: GitHub
- URL: https://github.com/britzl/defold-gyro
- Owner: britzl
- License: mit
- Created: 2017-03-22T05:32:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T09:58:47.000Z (about 1 year ago)
- Last Synced: 2024-10-09T13:05:53.921Z (4 months ago)
- Topics: defold, defold-library
- Language: C++
- Size: 31.6 MB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-defold - Gyro
README
![](docs/logo.png)
# Gyro
This is a gyroscope extension for the [Defold game engine](http://www.defold.com).## System requirements
The extension currently only supports iOS and Android.## Installation
You can use the Gyro extension in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add:https://github.com/britzl/defold-gyro/archive/master.zip
## Usage
function init(self)
gyro.start(function(self, quatx, quaty, quatz, quatw)
go.set_rotation(vmath.quat(quatx, quaty, quatz, quatw))
end)
endfunction final(self)
gyro.stop()
end## Example
The project contains an example that leverages [the camera extension](https://github.com/defold/extension-camera) to create an augmented reality experience:![](http://britzl.github.io/images/gyro_480.gif)
Note: The camera extension currently doesn't support Android which means that the Android example will use a static background instead of the camera feed.