Friday, December 9, 2022
HomeGame Developmentunity - Utilizing a line renderer to uncover a sample

unity – Utilizing a line renderer to uncover a sample


I am engaged on a coloring recreation, the place a person can choose a sample. As they’re utilizing the sample through the use of the cursor to pull over a specific a part of the display screen, the sample is revealed inside the traces of the drawing on the display screen. There are two methods:

  • Have the line-renderer “paint” on the sample
  • Have the sample already in some way fill the house beneath, detect the place the road renderer is, and reveal that a part of the sample – that is the popular methodology given the way it appears to be like neater

I need it to work like this: https://www.youtube.com/watch?v=ZVHQ14Wazgs&t=12s&ab_channel=TooniaApps (6 seconds in, with the rainbow).

I’ve efficiently used a line-renderer to create a line, utilizing an unlit materials. I’m attempting to determine how I can use this to “uncover” the sample under the drawing.

I’m serious about doing this:

  1. Utilizing Contact.enter to seize the place the place the cursor is.
  2. When the cursor faucets/drags over that half, it reveals the sample for these pixels inside a selected radius (undecided how).

The half that I’m not sure about:

  • Tips on how to fill the thing with the sample beforehand
  • Whether or not there’s one other technique to realize this

Query: I need assistance determining easy methods to use my present line renderer colouring methodology to assist customers paint patterns over a drawing space.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments