N
N
nuclear_kote2019-09-21 22:58:52
Unity
nuclear_kote, 2019-09-21 22:58:52

How to check if an object is visible?

There is a building, on the roof there is a collider with a trigger, when the character enters the roof is removed. There is a box in the building, on which there is also a collider. The character should only be able to interact with it when it is visible. I send a beam through the raycast and it sees the box collider, regardless of the presence of a roof over it. How to make it not interact?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alotofQ, 2019-09-26
@alotofQ

You send raykas into the box and the beam is not interrupted by anything. That is, formally anything can be in front of the beam, but if this anything does not have a collider, then the beam goes through and to the box

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question