Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor example #90

Merged
merged 1 commit into from
Nov 9, 2017
Merged

Sensor example #90

merged 1 commit into from
Nov 9, 2017

Conversation

BastiaanOlij
Copy link
Contributor

This is a little demo project I quickly threw together that reads out the accelerometer, magnetometer and gyroscope and visualises them.

The accelerometer and magnetometer are used to draw 3D vectors to visualise them. A 3rd vector is drawn with a calculated horizon aligned north. I did have issues on my iPhone with the magnetometer, I do not know yet if this is a bug, something in my code, or a fact of using this indoors with to much interference.

There are also two cubes drawn on the screen.
The left cube is orientated using the magnetometer and accelerometer data.
The right cube combines gyroscope and accelerometer data.

img_6654

Obviously this should be used on mobile phones. Someone should test this on Android. I suspect the vectors on Android are incorrect or change depending on the phones orientation (iOS does this and there is code in Godot to compensate).

@akien-mga
Copy link
Member

Matching the official snake_case convention, I think it's best if the files are named main.{gd,tscn} (lower case) and cube_6.png.

@BastiaanOlij
Copy link
Contributor Author

BastiaanOlij commented Nov 9, 2017

Ugh, Windows is ignoring the file name changes.. doesn't seem to care about case...

OK, I managed to fix it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants