This is my first game with Unity so I apologize for the potentially dumb question. I'm trying to make a top down shooter that moves the character with WASD and aims and shoots with the mouse (think Geometry Wars, the camera is stationary). I found a script for the aiming that works fine, the problem I'm having is with the moving. My character barely moves when it's going in the direction that it is facing. It moves perfectly when it's not moving forward in any way. I thought it may have something to do with the aiming script but even when I take that away it still does it. I figured it would be a simple fix but I've had trouble finding a solution. Here's my code:
var speed = 3.0;
var bulletPrefab:Transform;
function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
var Movement = Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
Movement *= speed;
controller.SimpleMove(Movement);
if(Input.GetButtonDown("Fire1"))
{
var bullet = Instantiate(bulletPrefab,
GameObject.Find("spawnPoint").transform.position,
Quaternion.identity);
bullet.rigidbody.AddForce(transform.forward * 2000);
}
}
@script RequireComponent(CharacterController)
Please let me know what you think.