- Home /
Question by
yuritanpopo · Mar 27, 2014 at 07:18 AM ·
inputacceleration
acceleration setting
To be one of the Y Input.acceleration before it becomes horizontal when tilting the smartphone Want to adjust
function Update () {
var dir: Vector3 = Input.acceleration;
dir.z = 0;
Physics2D.gravity = 9.8 * dir.normalized; }
Comment