O
O
OnGBR12020-07-09 07:44:59
Unity
OnGBR1, 2020-07-09 07:44:59

Painting an object inside a collider?

I am making a game in which a person guesses the location of objects on a map. I want the object to be highlighted on hover, but how can I do that?
I found a Sprite shape, but it turned out that it was not suitable for this purpose, especially because of it the game ate all the RAM.
Then I decided to select objects in Photoshop and transfer them to the map in the unit, and then highlight them, but since I have a lot of objects, it can take a lot of time.
I thought - "What if we cover the map in the unit with an object, then apply colliders and if a person moves the mouse over the collider, then only the zone that is inside the collider is highlighted." But can it even work? We have 1 object, logically it should be divided into very small parts.

I couldn't find anything like that on the Internet, I hope that they can help here.
Help me please.

PS if anyone is interested in what I'm trying to do, then here's a photo
5f06a169c7b5a188638333.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2020-07-09
@freeExec

From the camera, create a ray at the cursor position and get a list of colliders with which it intersects.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question