hi,
i am trying to edit the animation so when the user click’s the ‘fire1’ button it move the chracter controller in the direction the mouse is pointing. i have got the user to move when they press the mouse button but it will only go in one direction. Here my script if you can help thank you:
else if(Input.GetButton(“Fire1”))
{
CharacterController controller = GetComponent();
moveDirection = new Vector3(-5, 0, 0);
controller.Move(Vector3.forward * Time.deltaTime);
rotationX += Input.GetAxis(“Mouse X”) * sensitivityX;
rotationX = ClampAngle (rotationX, minimumX, maximumX);
Quaternion xQuaternion = Quaternion.AngleAxis (rotationX,Vector3.up);
transform.localRotation = originalRotation * xQuaternion;
}