- Home /
windows.store tablet move button
Hi, I have a windows.store game using standard assets first person controller that's in the store, all good. However, windows now has tablets and touch screens.
The mouse look is compatible- it moves the view using touch screen without any coding. nice.
The problem is move which with keyboard uses arrow keys. So without arrow keys, I need to add buttons to move the FPC, so I tried to set vertical axis positive (1) in cross platform input to start.
I created an empty object and added the prefab button handler script from crossplatforminput and renamed UIbuttonHandler, and I added a Forward button to a panel on the UI canvas.
I dropped the UIbuttonHandler on the Forward button, set the button action to call SetAxisPositive("Vertical") which is already in the script, but I get an error in Visual Studio that standalone can't accept that input, check platform and code where it is called. It seems the button handler prefab is just for mobile input such as Android.
Not sure what to do?
Do I move the FPC without using crossplatforminput? Or is there a way to set the axis using the cross platform input prefabs? What does it mean "code where it is called", as in: what would be in function I create to do this?
Thanks, Tom
Your answer
Follow this Question
Related Questions
how can I move my unity pro or iphone to anyother macbook? 2 Answers
moving a ball when touch 0 Answers
Animate an object to a new position... 1 Answer
Updating prefab information live 2 Answers
move Platform 2 Answers