Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Have prob with get axis

$
0
0
hi i am new to unity and just trying out some tutorials in scripting i am trying to move a sphere on a plane using this script using UnityEngine; using System.Collections; public class playerctrl : MonoBehaviour { void fixedupdate() { float movehorozantal = Input.GetAxis("Horizontal"); float movevertical = Input.GetAxis("Vertical"); Vector3 movement = new Vector3(movehorozantal , 0.0f , movevertical); rigidbody.AddForce(movement); } } and its not working. I added this script to the sphere

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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