FirstPersonSample¶
VR アプリで FistPerson の設定に合わせて、可視設定を反映するサンプルです。
画面が4分割されて、
HMDカメラ
その他のカメラ
の描画を例示します。
v0.87.0 Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs¶
1 void SetupTarget()
2 {
3 if (m_target != null)
4 {
5 m_target.Source = m_source;
6 m_target.SourceType = UniHumanoid.HumanPoseTransfer.HumanPoseTransferSourceType.HumanPoseTransfer;
7
8 m_blendShape = m_target.GetComponent<VRMBlendShapeProxy>();
9
10 m_firstPerson = m_target.GetComponent<VRMFirstPerson>();
11
12 var animator = m_target.GetComponent<Animator>();
13 if (animator != null)
14 {
15 m_firstPerson.Setup();
16
17 if (m_faceCamera != null)
18 {
19 m_faceCamera.Target = animator.GetBoneTransform(HumanBodyBones.Head);
20 }
21 }
22 }
23 }