Quantcast
Channel: Answers by "Dee Va"
Viewing all articles
Browse latest Browse all 88

Answer by Dee Va

$
0
0
var speed = 25; var rotateSpeed = 1; var curSpeed = 25; function Update () { var controller : CharacterController=GetComponent(CharacterController); var forward = transform.TransformDirection(Vector3.forward); var curSpeed = speed * Input.GetAxis ("Vertical"); controller.SimpleMove(forward * curSpeed); transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0); } @script RequireComponent(CharacterController) Attach this script to your player Object,hope this works :D

Viewing all articles
Browse latest Browse all 88

Trending Articles



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