Quantcast
Channel: Answers by "belvita"
Viewing all articles
Browse latest Browse all 91

Answer by belvita

$
0
0
i will help u but please vote me i help so many people but they do not appreciate thanx .attach this to the gameobject u wanna flip change the buttons a or d how u want. using UnityEngine; using System.Collections; public class flip : MonoBehaviour { private float X; private Vector3 position; // Use this for initialization void Start () { X=transform.localScale.x; position=transform.localScale; } // Update is called once per frame void Update () { if(Input.GetKey("a")) { position.x=X; //flip the texture transform.localScale = position; } else if(Input.GetKey("d")) { position.x=-X; //flip the texture transform.localScale = position; } } }

Viewing all articles
Browse latest Browse all 91

Trending Articles



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