P
P
PRIYD2020-04-30 18:53:55
C++ / C#
PRIYD, 2020-04-30 18:53:55

How to detect the end of an object?

Hello, when developing a project, a problem arose. There is a certain platform, it can be either polygonal or square. It is necessary that the function hanging on the character returns the distance to the nearest end (and the coordinates where the cliff is located) of this platform.
5eaaf48141f6c643716155.png

As far as I understand, it is possible to make a character's radius and check for the presence of a platform in this radius. But is this the right decision?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2020-04-30
@PRIYD

It is necessary to calculate through a collision (on what the character stands with himself) and angles.
Nothing extra needs to be attached.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question