Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

How to move a Sphere using physics

$
0
0
Hi!, Im new to Unity and have some experience with programing on calculators, so i decided to start by move a sphere with physics sounded simple enough well it wasnt, been getting error after error and after reading a lot i just cant solve it. My curent problems are the following: ![alt text][1] [1]: /storage/temp/43596-sin-titulo.png And my code looks like this: using UnityEngine; using System.Collections; public class PlayerControler : MonoBehaviour { public float speed; void Start(); { Rigidbody sphere = GetComponent(); Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical); } void FixedUpdate (); { float moveHorizontal = Input.GetAxis ("Horizontal"); float moveVertical = Input.GetAxis ("Vertical"); Sphere.Rigidbody.AddForce(movement * speed * Time.deltatime); } } Can anyone please help me? (btw escuse me if i have bad grammar or any other problem in my writting)

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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