- Home /
iPhone tracking device in Unity Environment
Hey,
I was wondering if is it possible to use the iPhone accelerometer as a tracking device to control the FPS controller direction and movement.
My idea was to build something like a remote that would allow to control the FPS controller movement (forward, backward, left and right) and direction (given by the iPhone accelerometer when the user turns his body left or right). The head movement would be controlled by an HMD with another tracking device (simulating the mouse movement).
I don't know if this is possible but I was hoping to get just a small brainstorming session in order to point me in the right direction.
Thanks
Answer by StephanK · Sep 02, 2011 at 07:22 AM
If I understand you correctly you mean the game is a standalone and the Iphone just sends its accelerometer data to your game. This is possible and you'd do it by establishing a Socket connection between iphone and the computer your game runs on. This can probably be done using Mono and should be very similar to what the unity remote tool does.
Probably it makes sense to use Objective-C on the iphone side although you should be able to write a "game" with unity that does the same.
Yes that is exactly the idea. I want to create a remote to control unity environments with the iPhone. Socket connection? Do you know where can I find any info about that? thanks
You could either try the .net documentation on Socket or check out this tutorial: http://www.codeproject.com/$$anonymous$$B/IP/$$anonymous$$FCSockets.aspx
Your answer
![](https://koobas.hobune.stream/wayback/20220612195751im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
frames per second on iphone 1 Answer
FPS + Time.time not accurate on iPhone5 1 Answer
Perfomance disparity between 3G and iTouch (iPhone 4) 1 Answer
iPhone joypad interfering with MouseLook 0 Answers
I want to have FPS iOS tutorials. 0 Answers