1
This commit is contained in:
@@ -188,7 +188,7 @@ public class GrabItem : MonoBehaviour
|
||||
{
|
||||
if (childAnimator != null)
|
||||
{
|
||||
childAnimator.transform.localScale = Vector3.zero;
|
||||
Destroy(childAnimator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using BigSpace.XRCore.Event;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class RayCtr : MonoBehaviour
|
||||
{
|
||||
@@ -72,9 +73,18 @@ public class RayCtr : MonoBehaviour
|
||||
if (starRay)
|
||||
{
|
||||
Debug.DrawRay(transform.position, transform.forward * rayLength, Color.red);
|
||||
Ray ray;
|
||||
if (SceneMgr.Instance.nowSceneId == 2)
|
||||
{
|
||||
ray = new Ray(transform.position, transform.forward);
|
||||
}
|
||||
else
|
||||
{
|
||||
var Cam = Camera.main;
|
||||
ray = new Ray(Cam.transform.position, Cam.transform.forward);
|
||||
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Ray ray = new Ray(transform.position, transform.forward);
|
||||
RaycastHit hit; // <20>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ײ<EFBFBD><D7B2>Ϣ
|
||||
//Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>......<2E><>1<EFBFBD><31>");
|
||||
if (Physics.Raycast(ray, out hit, rayLength, detectionLayer))
|
||||
|
||||
Reference in New Issue
Block a user