This commit is contained in:
账号名 2024-01-29 15:46:15 +08:00
parent 640bb4f529
commit 9f074ec875
5 changed files with 7 additions and 6 deletions

View File

@ -1903,7 +1903,7 @@ Camera:
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
far clip plane: 100
field of view: 60
orthographic: 0
orthographic size: 10

View File

@ -291,7 +291,7 @@ Transform:
m_GameObject: {fileID: 1001764166187808509}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 100, z: 0}
m_LocalScale: {x: 5, y: 1, z: 5}
m_LocalScale: {x: 4, y: 1, z: 4}
m_Children: []
m_Father: {fileID: 8425345772495695667}
m_RootOrder: 4
@ -2605,7 +2605,7 @@ Transform:
m_GameObject: {fileID: 8425345772495991571}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4, y: 4, z: 4}
m_LocalScale: {x: 3, y: 3, z: 3}
m_Children:
- {fileID: 4546932034029822561}
- {fileID: 404141722055020978}

View File

@ -1844,7 +1844,7 @@ GameObject:
- component: {fileID: 5088724492985955255}
- component: {fileID: 6811355874594529717}
- component: {fileID: 6875856172300922579}
m_Layer: 15
m_Layer: 16
m_Name: Reddot
m_TagString: Untagged
m_Icon: {fileID: 0}

View File

@ -200,7 +200,7 @@ GameObject:
- component: {fileID: 1918062767899976586}
- component: {fileID: 1555572023258120696}
- component: {fileID: 306032285193557315}
m_Layer: 15
m_Layer: 16
m_Name: reddot
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -216,7 +216,7 @@ Transform:
m_GameObject: {fileID: 1634967572523846151}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 100, z: 0}
m_LocalScale: {x: 3, y: 1, z: 3}
m_LocalScale: {x: 4, y: 1, z: 4}
m_Children: []
m_Father: {fileID: 8425345772495695667}
m_RootOrder: 4

View File

@ -271,6 +271,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
if (targetPoint != null && Receivingdistance > 0)
{
Vector3 pos = camera.WorldToViewportPoint(targetPoint.position);
Debug.Log("攻击目标距离"+Vector3.Distance(targetPoint.position, transform.position));
ispcamera = (pos.x > 0 && pos.x < 1 && pos.y > 0 && pos.y < 1 && pos.z > 0);
if (ispcamera)
{