S
S
Sputnik Upitera2019-08-11 19:55:11
C++ / C#
Sputnik Upitera, 2019-08-11 19:55:11

How to find a non-physical object?

Collider2D[] spawnpoints = Physics2D.OverlapCircleAll(coordinate, 0.1f);

looking for a physical object, but how can you find an object that has a certain shape in a certain place, but which cannot be collided with?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2019-08-11
@GavriKos

The terms are, of course, amazing...
Well, firstly, you can hang a collider, but make it a trigger. Then "you can't collide with it" - you can go through it and all that, but raycasts will pass into it.
If NO collider can be used - then only geometry. Take all the objects, count the distances from their centers to the center of the cast, compare with the standard, etc. Expensive, gemmorno, will require optimization.

G
Griboks, 2019-08-11
@Griboks

1. Save the list of objects.
2. Look for the required objects in this list.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question