godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.21k stars 21.04k forks source link

Add gravity and gyroscope support to UWP #7503

Closed BastiaanOlij closed 1 year ago

BastiaanOlij commented 7 years ago

This is related to PR #7127 which sees introduction of gyro and magneto support to iOS. Part of that PR adds the gravity vector alongside the accelerometer data. Both Android and UWP need to be brought in line so all three platforms are in sync. This vector is fairly handy for VR and AR implementations as the raw accelerometer data is the result of gravity pulling on the device + the user moving the device around and when used directly results in a lot of jitter.

On android this should be a pretty straight forward enhancement by adding TYPE_GRAVITY to the motion sensor code and writing it out to the gravity vector that was added to INPUT through #7127.

on UWP I have no idea at this time. You can find the documentation here: https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.accelerometer.aspx But on face value there is no implementation for extracting the gravity vector and it may require building that ourselves.

Unfortunately I don't have access to an Android nor Windows phone or I would add this change to 7127 myself

BastiaanOlij commented 7 years ago

Anybody available to add this on UWP?

vnen commented 6 years ago

I looked at the docs and did some searches but still have no clue how to extract the gravity vector. If anyone has an idea I can use the help.

ghost commented 6 years ago

First of all thank you for your report and sorry for the delay.

We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.

We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us. Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about it here?

For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.

Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.

Thanks in advance.

Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.

BastiaanOlij commented 5 years ago

For Android this was added, still waiting for someone to look into UWP, not sure if that really relevant though, who still has microsoft phones? :)

GeorgeS2019 commented 4 years ago

@BastiaanOlij please check if this recent UWP export experience closes this issue

vnen commented 4 years ago

@GeorgeS2019 no, it doesn't. Fixing the export won't magically add a gravity vector.

GeorgeS2019 commented 4 years ago

@vnen, I try to summarize all issues related to UWP because a working UWP godot export is critical for OpenXR support using Godot for Hololens (with gyro and magneto support)

This issue is also relevant for Godot VR ( Oculus android) or OpenXR for both Oculus (Android) and Hololens (UWP)

vnen commented 4 years ago

@GeorgeS2019 yeah, but this is the kind of issue that won't be solved without a specific PR addressing it. It's not related to the export process in itself. So adding comments like this only generate pointless noise. A tracker issue for all UWP related issues would be much more useful.

GeorgeS2019 commented 4 years ago

@vnen

A tracker issue for all UWP related issues would be much more useful.

Done => many of which are related to UWP export

In my view, the biggest challenge for any new person trying to address any (old and new) UWP issues will get stuck because UWP export is not reliable.

Without disseminating this limitation (UWP export is not reliable), many will waste lots of time.

vnen commented 4 years ago

@GeorgeS2019

A tracker issue for all UWP related issues would be much more useful.

Done => many of which are related to UWP export

That's an issue about C# support in UWP. Derailing it with unrelated comments isn't helpful. Here are examples of actual tracker issues.

In my view, the biggest challenge for any new person trying to address any (old and new) UWP issues will get stuck because UWP export is not reliable.

UWP export is an issue but anyone trying to address these issues either already know that or will hit it pretty soon. Commenting on every issue mentioning a possible workaround doesn't help when nobody mentioned the export being a deterrent for a potential fix. It is just noise.

You were already warned to stop cross-reference unrelated issues on the very same issue that you linked.

ZodmanPerth commented 4 years ago

@BastiaanOlij I confirm that while Input.get_gravity() doesn't work on UWP but Input.get_accelerometer() does work. I'm using 3.2.stable.official.

akien-mga commented 3 years ago

To clarify the current state, see the Input docs (as of 3.3):

BastiaanOlij commented 1 year ago

I'm closing this issue as this is way outdated and I think we redid some of this logic since then.