走り始めのゲーム開発あれこれ

ソースコードテスト

テスト

    public float speed;
    CharacterController cc;
    GameObject camPos;
    float x, z;
     // Start is called before the first frame update
    void Start()
    {
        cc = GetComponent<CharacterController>();
        camPos = transform.Find("Main Camera").gameObject;
    }

    // Update is called once per frame
    void Update()
    {
        x = Input.GetAxis("Horizontal");
        z = Input.GetAxis("Vertical");
        cc.Move(new Vector3(x * speed * Time.deltaTime, 0, z * speed * Time.deltaTime));
        transform.Rotate(0, Input.GetAxis("Mouse X"), 0);
        camPos.transform.Rotate(-Input.GetAxis("Mouse Y"), 0, 0);


要望ご意見等こちらへ:yukiyama8810@gmail.com 一緒に開発してくれる方も常に募集中です