i Have Been Looking For Character Controllers That Use WASD For Movement Instead Of An Axis, And Can Not Find One I Need One Pretty Much Like This One
using UnityEngine;
using System.Collections;
public class ScurgeofShadowsController : MonoBehaviour {
public float speed = 6.0F;
public float jumpSpeed = 8.0F;
public float gravity = 20.0F;
private Vector3 moveDirection = Vector3.zero;
void Update() {
if(CombatSystemScurge.PublicHealth <= 10) {
speed = 1.5f;
}
CharacterController controller = GetComponent<CharacterController>();
if (controller.isGrounded) {
moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *= speed;
if (Input.GetButton("Jump")) {
moveDirection.y = jumpSpeed;
}
}
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);
}
}
But Uses WASD. Thanks!