Announcement

Collapse
No announcement yet.

[FEATURE REQUEST] AR Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by vle07 View Post

    Thanks for the information. Is this only for Android, or does it also work for IOS? What would be an easy way to forward the magnetometer values? It seems like it requires JNI or UPL, both of which aren't that well documented. I'm considering just editing the nativeHandleSensorEvents function in the GameActivity.java file to pass along the current_magnetometer value, and then edit the corresponding AndroidJNI.cpp and AndroidInputInterface.cpp files to be able to handle the extra values. Or is there an easier way (like AR or VR plugins)?
    Hello and sorry to dig up this old post! For the future readers looking to simply leverage GPS and magnetometer data I would like to suggest the Location Toolkit and the Magnetic Field Toolkit, respectively, as complementary answers to the queries in this thread. The objective of these packs is to simplify the access and usage of the GPS/magnetic field data for all users. No code to write, with examples.

    Leave a comment:


  • replied
    Originally posted by Chris Babcock View Post
    This is in GameActivity.java in 4.18. Look in onSensorChanged().
    Thanks for the information. Is this only for Android, or does it also work for IOS? What would be an easy way to forward the magnetometer values? It seems like it requires JNI or UPL, both of which aren't that well documented. I'm considering just editing the nativeHandleSensorEvents function in the GameActivity.java file to pass along the current_magnetometer value, and then edit the corresponding AndroidJNI.cpp and AndroidInputInterface.cpp files to be able to handle the extra values. Or is there an easier way (like AR or VR plugins)?

    Leave a comment:


  • replied
    This is in GameActivity.java in 4.18. Look in onSensorChanged().

    Leave a comment:


  • replied
    Originally posted by Chris Babcock View Post
    HandleSensorEvents() in LaunchAndroid.cpp already samples the magnetometer if available, but doesn't forward on the results. The value is in current_magnetometer and only used to work out the rotation matrix for the orientation.
    I can't find the current_magnetometer value in LaunchAndroid.cpp. Do you know how to get the magnetometer values in 4.18? I would like to calculate the absolute orientation of mobile devices (for both Android and IOS) relative to earth's gravity and magnetic north.

    Leave a comment:


  • replied
    HandleSensorEvents() in LaunchAndroid.cpp already samples the magnetometer if available, but doesn't forward on the results. The value is in current_magnetometer and only used to work out the rotation matrix for the orientation.

    Leave a comment:


  • replied
    How about magnetometer? I need the direction of N or S to determine any mobile device's tilt in addition to the direction of the gravity and gyroscope.

    Leave a comment:


  • replied
    GPS location services will be in 4.15.

    Leave a comment:


  • replied
    There's already a free webcam AR solution available

    Leave a comment:


  • started a topic [FEATURE REQUEST] AR Support

    [FEATURE REQUEST] AR Support

    I am not sure if it is has been stated before, Being able to utilize the phone or tablet camera and render objects in the foreground, and using gps location.
Working...
X