Hello above all I am French, saddened by my faults. I am novice on unity I would like that somebody makes for me or explains me to add how this script the possibilitée has to jump to run(roam) and to strike if possible with the animations (named(appointed): " jump " " run " “punch”); thank you in advance !
The script (javascript) :
var vitesseMouvement = 4.0;
var vitesseRotation = 3.0;
function Update () {
var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0,Input.GetAxis("Horizontal") * vitesseRotation, 0);
var enAvant = transform.TransformDirection(Vector3.forward);
var vitesseDeplacement = vitesseMouvement * Input.GetAxis("Vertical");
controller.SimpleMove(enAvant * vitesseDeplacement);
}
@script RequireComponent (CharacterController)