Phoney - iOS sensor simulator

Hey fellas. I’ve made a sensor simulator using JMonkeyEngine quite some time ago. It’s used to simulate rotation of the device(phone). It can be used if you don’t have the actual device, or if you need a test case using precise rotation and animations. More at GitHub - nmarkovic04/PhoneyUI: Camera and sensor simulator UI.

1 Like

uh…not sure what I am seeing here…
Only the left window 3d view is made out of JME right? What’s showing in the emulator is not JME? it?

It’s not. The emulator is a 3D scene in OpenGL ES on iOS. The camera on that scene should move when you move the actual device around(rotate), as the rotational data is read from the gyroscope sensor. But since this is a simulator, there is no actual gyroscope or sensors. So we connect our simulator to the Phoney simulator (done with JME) and simulate the device rotation.

So… say you have game running on your phone, rotating the phone in any dimension will rotate the camera in the game by the same amount? Is that what we’re seeing?

Yep. It’s only an example scene on the simulator. What it really does is simulate device rotation and buffers the rotation matrix over the UDP. All you need to do is instantiate the Phoney MotionManager inside your iOS application instead of Core Motion’s CMMotionManager and read the data. It’s more of a iOS dev tool than anything else.