- Home /
Question by
hariszaman · Mar 21, 2013 at 08:57 AM ·
iphoneaccelerationtilttilting
iPhone tilt Control
I am using the following code inside update to do tilting of the player for some reason it is not working fine can anyone tell me the answer thanks
mytransform.Translate(Vector3.right*Mathf.Clamp(dir.x*1.5f,- 1.5f, 1.5f ));
where dir.x is the normalized x component of the iphone acceleration
Comment
Your answer
Follow this Question
Related Questions
iPhone acceleration events problem 1 Answer
Zero-ing the Input.acceleration.z 0 Answers
C# Tilting object with acceleration on andoid 0 Answers
Using Mathf.Clamp in unity for boundries 2 Answers
iPhone Gyroscope problem 0 Answers