implementation/first_person.md

This commit is contained in:
ousttrue
2021-10-08 18:42:48 +09:00
parent 1c7911ffe9
commit c68feee0e9
4 changed files with 34 additions and 21 deletions

View File

@@ -0,0 +1,17 @@
# VRアプリケーションの FirstPerson 設定による Renderer の可視制御
* `isSelf==true` 自分のアバター
* `isSelf==false` 自分以外のアバター
* FP Camera: HMDと連動するカメラ
* TP Camera: それ以外のすべてのカメラ
| isSelf | FirstPerson設定 | FP Camera | TP Camera | レイヤーによる可視制御例 |
|--------|-----------------|-----------|-----------|-----------------------------------------------|
| true | FirstPersonOnly | ✅ | ❌ | FIRSTPERSON |
| true | ThirdPersonOnly | ❌ | ✅ | THIRDPERSON |
| true | Both | ✅ | ✅ | default |
| true | Auto | - | - | FirstPersonOnly と ThirdPersonOnly に分割する |
| false | FirstPersonOnly | ❌ | ❌ | 完全に描画されない。Rendererの描画を止める |
| false | ThirdPersonOnly | ✅ | ✅ | default |
| false | Both | ✅ | ✅ | default |
| false | Auto | ✅ | ✅ | default。メッシュ分割など特別な処理は不要 |

View File

@@ -21,6 +21,18 @@ UniVRMを使うアプリケーションのビルドに関する注意事項
build
```
## 実装メモ
```{toctree}
:maxdepth: 1
implementation/runtime_resource_management
implementation/texture_manipulation
implementation/coordinate
implementation/fast_spring_bone
implementation/first_person
```
## glTF
```{toctree}
@@ -45,17 +57,6 @@ vrm0/0_58_blendshape
vrm0/firstperson
```
## 実装メモ
```{toctree}
:maxdepth: 1
implementation/runtime_resource_management
implementation/texture_manipulation
implementation/coordinate
implementation/fast_spring_bone
```
### Samples
- SimpleViewer

View File

@@ -1,16 +1,9 @@
# VRMFirstPersonの使い方
## VRMFirstPersonの設定
[VRMFirstPerson]({{< relref "univrm_firstperson.md" >}})ではRendererに対して設定があります。
{doc}`FirstPerson と Renderer の可視制御 </implementation/first_person>`
|FirstPersonFlag |レイヤー |備考 |
|------------------------------|----------------------|--------------------------------------------|
|Both |default |一人称と三人称で分ける必要のない部分に指定します|
|ThirdPersonOnly |VRMThirdPersonOnly|一人称時に描画したくない部分に指定します |
|FirstPersonOnly |VRMFirstPersonOnly|三人称時に描画したくない部分に指定します。自動作成した頭部無しモデルが使います|
|Auto |VRMThirdPersonOnly|実行時に一人称用モデルを自動で作成し、それをFIRSTPERSON_ONLY_LAYERに設定します|
実行時に**VRMFirstPerson.Setup**を呼び出すことで、上記のレイヤー設定を行うことができます。明示的に外部から呼び出してください。
実行時に**VRMFirstPerson.Setup**を呼び出すことで、FirstPerson設定に応じた Renderer の可視制御を行うことができます。
明示的に外部から呼び出してください。
## アプリケーションに追加の描画レイヤーを指定する

View File

@@ -1,5 +1,7 @@
# FirstPerson
{doc}`FirstPerson と Renderer の可視制御 </implementation/first_person>`
## Runtime に FirstPerson 機能を有効にする
VR向け FirstPerson 設定の初期化手順です。