Exemplo n.º 1
0
    void Movement_()            //Передвижение
    {
        int vector_forward = 1; //Направление движения вперёд

        Vector3 direction = My_transform.TransformDirection(Vector3.forward * vector_forward);

        float cur_speed = Speed;

        CharacterController_.SimpleMove(direction * cur_speed);
    }
Exemplo n.º 2
0
 void Rotation()//Поворот камеры
 {
     Camera_transform.Rotate(new Vector3(Input.GetAxis("Mouse Y") * Speed_rotation, 0, 0));
     My_transform.Rotate(new Vector3(0, Input.GetAxis("Mouse X") * Speed_rotation, 0));
 }