Quantcast
Channel: Questions in topic: "left"
Viewing all articles
Browse latest Browse all 135

why I can not walk with the ship to the left with the arrow in my draft game?

$
0
0
I am new to "unity 3d", can someone explain why I can not walk with the ship to the left with the arrow in my draft game? Walk with all the arrows, but less with the left. can someone help me? I put the commands were these: var vel = 50; function Start () { } function Update () { if(transform.position.x<=-16){ if(Input.GetKey(KeyCode.LeftArrow)){ transform.Translate(vel*Time.deltaTime*-1,0,0); } } if(transform.position.x<=16){ if(Input.GetKey(KeyCode.RightArrow)){ transform.Translate(vel*Time.deltaTime,0,0); } } { if(Input.GetKey("up")){ transform.Translate(0,0,vel*Time.deltaTime*-1); } } { if(Input.GetKey("down")){ transform.Translate(0,0,vel*Time.deltaTime*1); } } }

Viewing all articles
Browse latest Browse all 135

Trending Articles



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