Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
2046045a2This file is pinned to the selected release. Download the original to open it in your design tool.
using System.Collections;
using System.Collections.Generic;
using Leap.Unity.PhysicalInterfaces;
using UnityEngine;
namespace Leap.Unity.Layout {
public class SimpleCameraFacingPoseProvider : MonoBehaviour,
IPoseProvider {
public bool flipPose = false;
public Pose GetPose() {
return new Pose(GetTargetPosition(), GetTargetRotation());
}
public Vector3 GetTargetPosition() {
return this.transform.position;
}
public Quaternion GetTargetRotation() {
return Utils.FaceTargetWithoutTwist(this.transform.position,
Camera.main.transform.position,
flipPose);
}
}
}