Playmaker Forum
PlayMaker Help & Tips => iOS Help => Topic started by: painkillers on February 18, 2013, 06:03:20 PM
-
Hi All - looking for some help on the device acceleration tutorial or my general setup. I've followed the device acceleration tutorial for the marble game but when I build either my scene or Chris' scene my directions are off, such as:
*Tilt device forward -> marble to goes right
*Tilt device back -> marble to goes left
*Tilt device right -> marble goes forward
*Tilt device left -> marble goes backward
If someone has any insight on this, I would really appreciate it.
-
At a guess you have your device orientation (found in player prefs) set to the wrong orientation.
-
Hi,
The problem with expecting the user to hold the device in a certain orientation is that it's hardly ever the case... but I have yet to find a useful library or script that does device orientation properly and reliably, so if anyone knows a script or a tool, I will be glad to port it in playmaker if reliable.
bye,
Jean
-
Modern flying games use a calibrate button,once you have your position press calibrate then it will zero out the accelerometer.
-
Hi Guys,
Thanks for the insight. To clarify, I had device orientation locked to Landscape Right which is why it was really troublesome. However, I was able to get it working by manipulating the math a bit. I had to multiply the Y acceleration by a negative number, map the Y acceleration to the X vector and X acceleration to the Z vector.
-
Hi painkillers
Any chance you could share your layout as I had problems working out how to transform the accelerometer movement to the planes movement,I thought to store the movement from the accelerometer movement in a vector 3 then use set rotation using the vector 3 but that didn't work.
-
Hey Gamedivision,
Sorry for the delay. Unity and Playmaker are my weekend hobby. Here's how I setup my scene. I hope this helps.