Is there any way to get access to GPS and Magnetometer?

It is definitely possible with C++. Even if UE4 doesn’t give you direct access to it (in case it doesn’t, not sure) you could still access it through native c++ code. So there is definitely a way you could get this to work, how easy it is however, requires some research.

Well the title says it already. We are planing to create a AR Game and played a bit around with UE4 to see if it fits for our Project. Everything is perfect to the point that we need the players GPS information. Magnetometer would be great but its not badly necessary. But without GPS the concept of our game does not work.

To that point we dont have any big experience with c++. But i think if there would be way with c++ we could work with it.

GPS (geolocation to be more exact) is not implemented in Unreal APIs you would need to do C++ external calls, but for magnetometer you could try to get data from it via motion input, thru im not 100% sure if you can get compass like data

https://docs.unrealengine.com/latest/INT/API/RuntimeModules/Engine/GameFramework/UPlayerInput/InputMotion/index.html

Doc page is now here : UPlayerInput::InputMotion | Unreal Engine Documentation

how to prepare a native ue4 class to access these call these sensor functions (e.g. wich headers to include)? gz

Any updates on getting access of magnetometer?
I’d like to calculate a tilt of a mobile device, and the value of magnetometer is necessary for it, in addition to rotation rate and gravity.
It will be perfect if there is a blueprint node to getting the value of magnetometer, but for now, is there any actual C++ code for accessing to the magnetometer? I am using iPad.

Thanks.

Anwser is misleading, all UE4 code is native, UE4 simply use wrapper API so porting between platfroms is easier but UE4 APIs can’t cover everything that is in the world. Just include right header files, if needed you can include paths in build script (*.cs file) but if you use base platform APIs you most likely don’t need to do anything. Keep in mind those platform APIs are only avable when you build code on specific platfrom, you will need to add considetion macros for platfrom specific code, in case of Android it will be like this:

#if PLATFORM_ANDROID
//Android exclusive code here
#endif

If oyu don’t do that you will get error when you build for other platfroms

As for which header files to included check Android documentation and search in general android development sites

GPS will be supported in 4.15