Use follow solver and update canvas position
This commit is contained in:
parent
e81c24ddf7
commit
0046202dce
|
@ -16977,6 +16977,7 @@ GameObject:
|
|||
- component: {fileID: 9095211984209372690}
|
||||
- component: {fileID: 9095211984209372689}
|
||||
- component: {fileID: 9095211984209372691}
|
||||
- component: {fileID: 9095211984209372692}
|
||||
m_Layer: 0
|
||||
m_Name: ScrollParent
|
||||
m_TagString: Untagged
|
||||
|
@ -19695,7 +19696,7 @@ MonoBehaviour:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3467693338133494675}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4684083f6dff4a1d8a790bccc354fcf4, type: 3}
|
||||
m_Name:
|
||||
|
@ -19927,6 +19928,45 @@ AudioSource:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &9095211984209372692
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3467693338133494675}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4479a0bd44d822241a4c5f4890c481c0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
updateLinkedTransform: 0
|
||||
moveLerpTime: 0.3
|
||||
rotateLerpTime: 0.1
|
||||
scaleLerpTime: 0
|
||||
maintainScaleOnInitialization: 1
|
||||
smoothing: 1
|
||||
lifetime: 0
|
||||
orientationType: 1
|
||||
faceTrackedObjectWhileClamped: 1
|
||||
faceUserDefinedTargetTransform: 0
|
||||
targetToFace: {fileID: 0}
|
||||
pivotAxis: 7
|
||||
minDistance: 0.3
|
||||
maxDistance: 0.7
|
||||
defaultDistance: 0.5
|
||||
maxViewHorizontalDegrees: 30
|
||||
maxViewVerticalDegrees: 20
|
||||
reorientWhenOutsideParameters: 1
|
||||
orientToControllerDeadzoneDegrees: 60
|
||||
ignoreAngleClamp: 0
|
||||
ignoreDistanceClamp: 0
|
||||
ignoreReferencePitchAndRoll: 0
|
||||
pitchOffset: 0
|
||||
verticalMaxDistance: 0
|
||||
angularClampMode: 0
|
||||
tetherAngleSteps: 6
|
||||
boundsScaler: 1
|
||||
--- !u!33 &9134068405370652459
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace WebViewStream
|
|||
{
|
||||
List<GameObject> canvases = endpointLoader.GetInstantiatedItems();
|
||||
|
||||
Vector3 localOffset = new Vector3(-0.4f, 0.1f, 1f);
|
||||
Vector3 localOffset = new Vector3(-0.3f, 0.1f, 1.5f);
|
||||
|
||||
foreach (GameObject canvas in canvases)
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace WebViewStream
|
|||
private Vector3 CalculateNextPosition()
|
||||
{
|
||||
Transform cameraTransform = Camera.main.transform;
|
||||
Vector3 localOffset = new Vector3(-0.4f, 0.1f, 1f);
|
||||
Vector3 localOffset = new Vector3(-0.3f, 0.1f, 1.5f);
|
||||
|
||||
if (instantiatedItems.Count == 0)
|
||||
{
|
||||
|
@ -103,10 +103,10 @@ namespace WebViewStream
|
|||
RectTransform rectTransform = item.GetComponent<RectTransform>();
|
||||
if (rectTransform != null)
|
||||
{
|
||||
return rectTransform.rect.width * rectTransform.lossyScale.x + 0.2f;
|
||||
return rectTransform.rect.width * rectTransform.lossyScale.x;
|
||||
}
|
||||
|
||||
return 0.8f;
|
||||
return 0.6f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -4,6 +4,8 @@ using Microsoft.MixedReality.Toolkit.UI;
|
|||
using UnityEngine;
|
||||
using UnityEngine.Windows.WebCam;
|
||||
#if WINDOWS_UWP && !UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Storage;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue