mirror of
https://github.com/SDraw/ml_mods_cvr.git
synced 2026-06-25 07:48:25 +00:00
Fixed LeapMotionExtension
This commit is contained in:
parent
92357d3076
commit
ee28311d5d
7 changed files with 40 additions and 10 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.Savior;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ml_lme
|
||||
|
|
@ -24,10 +25,9 @@ namespace ml_lme
|
|||
{
|
||||
if(Instance != null)
|
||||
{
|
||||
Object.DestroyImmediate(this);
|
||||
Object.Destroy(this);
|
||||
return;
|
||||
}
|
||||
|
||||
Instance = this;
|
||||
|
||||
m_root = new GameObject("Root").transform;
|
||||
|
|
@ -136,9 +136,9 @@ namespace ml_lme
|
|||
{
|
||||
if(Settings.Enabled)
|
||||
{
|
||||
Transform l_camera = PlayerSetup.Instance.activeCam.transform;
|
||||
m_root.position = l_camera.position;
|
||||
m_root.rotation = (Settings.HeadAttach ? l_camera.rotation : PlayerSetup.Instance.GetPlayerRotation());
|
||||
Transform l_pivot = MetaPort.Instance.isUsingVr ? PlayerSetup.Instance.vrCamera.transform : PlayerSetup.Instance.desktopCameraPivot;
|
||||
m_root.position = l_pivot.position;
|
||||
m_root.rotation = (Settings.HeadAttach ? l_pivot.rotation : PlayerSetup.Instance.GetPlayerRotation());
|
||||
|
||||
LeapParser.LeapData l_data = LeapManager.Instance.GetLatestData();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue