Question by
User2083400 · Mar 24, 2016 at 04:16 PM ·
c#error-handling
Why does not this C# script work? (movement)
This code should moves a gameobject but it doesn't work. using UnityEngine; using System.Collections;
public class Movement : MonoBehaviour {
private Rigidbody rb;
void Start ()
{
rb = GetComponent<Rigidbody>();
}
void ForFixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rb.velocity = movement;
}
} sorry for my bad english im german
Comment
Your answer

Follow this Question
Related Questions
error CS0118 'charanim.CameraTurn' is a field but a 'type' was 'expected' 1 Answer
[resolved] How do I deactivate a button once its height is < 40 in c# 0 Answers
Display pictures in assets folder in random order 0 Answers
How can I get bearer token from Facebook login Unity3d 1 Answer
How can I fix UnityEngine.Random.Range (Int32 min, Int32 max) Stack Overflow 0 Answers