xirang/Assets/scripts/playerpoint.cs
杨号敬 6664b0584c add
2024-11-26 22:01:14 +08:00

34 lines
703 B
C#

using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting.FullSerializer;
using UnityEngine;
public class playerpoint : MonoBehaviour
{
public Transform playermode;
void Start()
{
}
// Update is called once per frame
void Update()
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hitInfo;
if (Input.GetMouseButtonDown(0))
{
if (Physics.Raycast(ray, out hitInfo))
{
//ÉäÏßÑ¡ÔñÈËÎï
if (hitInfo.collider.gameObject.name == "showman")
{
}
}
}
}
}