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