1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

公式サイト「初めてのVRアプリを構築する」をやってみる

Last updated at Posted at 2021-10-10

#ちゃんと動作した!

#2021/10/22

  • Text オブジェクトの追加
  • First-wallにScriptを追加した。やはり日本語ではNG。
  • また これを使った> ロケールをUS指定して開くリンク
  • 再生ボタンを押して、カーソルキーで ボールが転がった!
  • ビルドもできて、Oculus内で立体に見えて動いた!
  • スクリーンショット 2021-10-22 21.30.10.png

#2021/10/20

  • Inspectorが真っ白で焦った。>SceneWindowsでオブジェクトを選択したら表示された
  • PlayerControllerのSPEEDを500に設定した

#2021/10/19

PlayerController.c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{
    // Appears in the Inspector view from where you can set the speed
    public float speed;

    // Rigidbody variable to hold the player ball's rigidbody instance
    private Rigidbody rb;

    // Called before the first frame update
    void Start()
    {
        // Assigns the player ball's rigidbody instance to the variable
        rb = GetComponent<Rigidbody>();
    }

    // Called once per frame
    private void Update()
    {
        // The float variables, moveHorizontal and moveVertical, holds the value of the virtual axes, X and Z.

        // It records input from the keyboard.
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical = Input.GetAxis("Vertical");

        // Vector3 variable, movement, holds 3D positions of the player ball in form of X, Y, and Z axes in the space.
        Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);

        // Adds force to the player ball to move around.
        rb.AddForce(movement * speed * Time.deltaTime);
    }
}

#2021/10/17

  • floorを作った
  • player-ballを作った
  • 壁を4つ作った
  • カメラのライティングを調整した
  • ステップ3で一旦作業中断

#2021/10/12

  • 4つのマテリアル用の色を作った

#2021/10/10

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?