Как и derHugo siad, вы можете использовать OnTriggerStay()
. Хотя вы также можете использовать raycast, чтобы проверить, находится ли что-то под кораблем:
public void FixedUpdate()
{
RaycastHit hit;
if (Physics.Raycast(transform.position, -transform.up, out hit, 10f))
{
//Here obj will be filled with the gameobject under your ship. You can use this to check for the tag, get components and outline the object.
var obj = hit.transform.gameObject;
}
}
Надеюсь, это направит вас в правильном направлении.