Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,711
6,304
I'm working on making a game in Unity. Right now, I'm just testing it on OS X but I'd like to publish it for both OS X and iOS. The game requires the following controls:
- Fire Button
- Jump Button
- Pause Button
- X/Y Aiming
- A single axis for moving

The X/Y Aiming I can just do with touches, but I'm curious how I can manage those 3 buttons + an axis (note: just one axis, not two. The game is a 2D sidescroller so there's no need for a second axis.)

I know that I can add GUI elements for onscreen controls and then just track touches within those, but I want to have those be seen as being equivalent to the physical inputs, so that I don't have to duplicate code.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.