B
B
Bur-Burito2016-12-15 02:26:27
Game development
Bur-Burito, 2016-12-15 02:26:27

How to determine the distance to an obstacle in Unity in 2D mode?

In 3D mode, according to Hawking, I created a beam and a hit, which was initialized in a method in no extension with similar parameters. Actually, it is logical, because specifically in my case, between the barrier and the character there are objects that indicate the ground (view from above). Actually, how to proceed? Or where can I read something to find out? Physics.RayCast(ray, out hit)
Physics2D.RayCast

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GreatRash, 2016-12-15
@Bur-Burito

Everything is there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question