protected override void Initialize(Human actor) { base.Initialize(actor); // Get position of actor's eyes _Head = Actor.gameObject.AddComponent <TransientHead>(); _EyeTransform = TransientHead.GetEyes(Actor); // 3D-ize actor's voice if (actor.voice) { _HeartField.SetValue(actor.voice, OSPAudioVolumeManager.Create(_HeartField.GetValue(actor.voice) as AudioVolumeManager)); _VoiceField.SetValue(actor.voice, OSPAudioVolumeManager.Create(_VoiceField.GetValue(actor.voice) as AudioVolumeManager)); } // Register bones foreach (var bone in SoftCustomBones) { DynamicColliderRegistry.RegisterDynamicBone(bone); } foreach (var bone in SoftBones) { DynamicColliderRegistry.RegisterDynamicBone(bone); } }
protected override void Initialize(Human actor) { base.Initialize(actor); // Get position of actor's eyes _Head = Actor.gameObject.AddComponent <TransientHead>(); _EyeTransform = TransientHead.GetEyes(Actor); // 3D-ize actor's voice if (actor.voice) { _HeartField.SetValue(actor.voice, OSPAudioVolumeManager.Create(_HeartField.GetValue(actor.voice) as AudioVolumeManager)); _VoiceField.SetValue(actor.voice, OSPAudioVolumeManager.Create(_VoiceField.GetValue(actor.voice) as AudioVolumeManager)); } // Register bone collider RegisterDynamicBoneCollider(VR.Mode.Left.GetComponentInChildren <DynamicBoneCollider_Custom>()); RegisterDynamicBoneCollider(VR.Mode.Right.GetComponentInChildren <DynamicBoneCollider_Custom>()); }