- Home /
Question by
MDennis · Jun 15, 2011 at 11:35 AM ·
iphoneaccelerometery-axisx-axis
Accelerometer being able to not affect one item
Hello,
I want to be able to use the accelerometer on the iphone to be able to move a character on the x axis only, but then also able to affect backgrounds on the x AND y axis. Is there a possible way to do this? I have this working with the x axis but being able to restrict a gameobject to not use the y axis is very odd.
Comment
Best Answer
Answer by almo · Jun 15, 2011 at 01:38 PM
The accelerometer returns seperate values for x, y and z. Just use x only for the character, and use both x and y for the backgrounds.
Your answer
Follow this Question
Related Questions
GTA Style Aiming 0 Answers
How to make simple tilting function on the iPhone 2 Answers
how to convert Input.mousePosition into iphone/android accelerometer? 1 Answer
Bat Swing Iphone 0 Answers