the code work but is not push the ball with speed of the character ?
using UnityEngine;
using System.Collections;
public class PlayerControllerP1 : MonoBehaviour {
public float moveSpeed;
private Vector3 moveDirection;
// public float gravity = 20.0F;
void Update()
{
moveDirection = new Vector3(Input.GetAxisRaw("p1 Horizontal"), 0, Input.GetAxisRaw("p1 Vertical")).normalized;
}
void FixedUpdate ()
{
GetComponent<Rigidbody>().MovePosition(GetComponent<Rigidbody>().position + transform.TransformDirection(moveDirection) * moveSpeed * Time.deltaTime);
}
}