- Home /
 
               Question by 
               Yuemari · Apr 01, 2012 at 10:00 PM · 
                iphoneaccelerometerrelativerealistic  
              
 
              Relative Accelerometer Movement
Hi im pretty new in Unity, but i want to know how to make my accelerometer readings relative, i mean, if i rotate the device to make Input.acceleration.x = 0.5 and then rotate back to make Input.acceleration.x = 0.2 have a result of -0.3 in another variable, im trying by storing last acceleration and then make a rest:
v3NewDirection = Input.acceleration - v3LastDirection;
v3LastDirection = v3NewDirection;
transform.Translate(fSpeed*transform.right*v3NewDirection.x*Time.deltaTime);
And also need to make the transition smooth, how can i archive this effect?. Help please!
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                