0
0

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.

Unityを使い始めてからのメモ(随時更新)

Last updated at Posted at 2021-01-24

[SerializeField]って?

  • privateメンバをInspectorに表示させたい時に変数の前につける

Can't add script component~というエラー

  • scriptファイル名をrenameした際にクラス名が変更されないために生じるので、scriptファイル名をrenameした際はクラス名の変更もしないといけない。

「bluetoothが繰り返し停止しています。」とOculusの画面にずっと表示され、再起動しても直らない。

  • 結局Oculus Quest2を初期化すると直った。

CommandInvokationFailure: Unable to forward network traffic to device. Please make sure the Android SDK is installed and is properly configured in the Editor.

  • Buildはできるが、Build & Runができなかった。
  • 1個上でQuest2を初期化するとこのエラーも直っていた。

座標系や回転

  • Unityは左手系
  • X軸の回転であればX軸の矢印の先から原点方向を見ている状態での時計回りが正の回転、Y軸Z軸も同様。

OVR Grabbable

SnapOffset

  • 手の中心から掴むモノの座標をOffset分だけずらす
  • Snap Offsetで指定したオブジェクトのPositionとRotationが適用
  • 値はWorld座標系での原点との距離=offsetになる
  • offsetを調整するときにSceneビュー上での各軸の方向は関係ない。
  • 各軸のどれかに値を入れてみて、この値ではこの位置にオブジェクトが移動するから~といった流れで実験的に調整

モノに近づくとある一定以上近づけない

  • 自分とモノのcollider同士がぶつかっていない?モノのcollider小さくしてみたら?

Make sure your device is plugged in~

  • クイック設定 → 設定 → 開発者 → USB接続確認ダイアログを有効で解決
0
0
1

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?