If I was running a FPS like counter-strike on my PC would it be possible to have the phone (connected to the PC via WiFi/Bluetooth) act as the mouse and control the character'开发者_开发百科s looking direction? For example, the player stands up in front of his computer and points his phone up + down, and 360 degrees around him, and the character in the game follows the direction with its gun?
Everything is possible.... Everything.
Assume you can write a socket class that would connect to your PC app. I'm new to android so I don't know what it's got in it's native java - That would handle sending info to the desk... I don't think it would have to be significant amounts of data, but it would be a stream.
With that in place, I'd create a way to capture the movements of the PDA and push them to the DESK.
Okay now you've got the data from the PDA in the desk app's sphere.. --it's best to do as much processing on the desk as you can.. More power.. -- Record the values as you do things like turn around, and point the device up/down.. all the movements you can think of.
Finally, take the recorded values and see if you can "mimic" the actual moves in the game.
So; can it be done. Sure.. easily? That depends on your def of the word easy.
精彩评论