mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-06 03:39:23 +00:00
Minor change
This commit is contained in:
parent
b6a4e0cd0a
commit
1928992893
4 changed files with 35 additions and 39 deletions
|
@ -6,7 +6,7 @@ namespace ml_dht
|
|||
{
|
||||
class FaceTracked : MonoBehaviour
|
||||
{
|
||||
bool m_enabled = true;
|
||||
bool m_enabled = false;
|
||||
float m_smoothing = 0.5f;
|
||||
bool m_mirrored = false;
|
||||
bool m_faceOverride = true;
|
||||
|
@ -41,20 +41,6 @@ namespace ml_dht
|
|||
m_eyebrowsProgress = p_data.m_brows;
|
||||
}
|
||||
|
||||
public void OnEyeControllerUpdate()
|
||||
{
|
||||
if(m_enabled)
|
||||
{
|
||||
// Gaze
|
||||
PlayerSetup.Instance.eyeMovement.manualViewTarget = true;
|
||||
PlayerSetup.Instance.eyeMovement.targetViewPosition = m_camera.position + m_camera.rotation * new Vector3((m_gazeDirection.x - 0.5f) * -2f, (m_gazeDirection.y - 0.5f) * 2f, 1f);
|
||||
|
||||
// Blink
|
||||
PlayerSetup.Instance.eyeMovement.manualBlinking = true;
|
||||
PlayerSetup.Instance.eyeMovement.blinkProgress = m_blinkProgress;
|
||||
}
|
||||
}
|
||||
|
||||
void OnLookIKPostUpdate()
|
||||
{
|
||||
if(m_enabled && (m_headBone != null))
|
||||
|
@ -64,6 +50,20 @@ namespace ml_dht
|
|||
}
|
||||
}
|
||||
|
||||
public void OnEyeControllerUpdate(CVREyeController p_component)
|
||||
{
|
||||
if(m_enabled)
|
||||
{
|
||||
// Gaze
|
||||
p_component.manualViewTarget = true;
|
||||
p_component.targetViewPosition = m_camera.position + m_camera.rotation * new Vector3((m_gazeDirection.x - 0.5f) * -2f, (m_gazeDirection.y - 0.5f) * 2f, 1f);
|
||||
|
||||
// Blink
|
||||
p_component.manualBlinking = true;
|
||||
p_component.blinkProgress = m_blinkProgress;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnFaceTrackingUpdate(CVRFaceTracking p_component)
|
||||
{
|
||||
if(m_enabled && m_faceOverride)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue