Y
Y
Yan Kalashnikov2021-09-25 22:08:43
C++ / C#
Yan Kalashnikov, 2021-09-25 22:08:43

How to implement an ultrasonic (ultrasonic) distance sensor in Unity?

How can I implement an ultrasonic sensor in Unity? Namely, so that the script calculates the distance from the sensor to the object with a certain viewing angle?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2021-09-26
@GavriKos

The question is the most incomprehensible, to be honest.
The distance between objects is calculated elementarily through the Magnitude of the vectors. Well, or coordinates.
You can also get all objects in a certain sector (the viewing angle is a sector) both geometrically (belonging to a sector) and raycast with a step.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question