Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Changing Global to Local Movement

$
0
0
I need to make this script so that when my character falls on his side, movement is normal. This is my script but when you fall on your side and tot the device, you move up and down. It's a 2D game if that maters. using UnityEngine; using System.Collections; public class AccelerometerInput : MonoBehaviour { void Update () { transform.Translate(Input.acceleration.x, 0, 0); } }

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>