Hello, we would like to create a cone aim effect similar to Brawl Stars where the cone of the aim is cut in the point it collides with something.
Example:
Any ideas on how we could do that?
Thank you,
Marco
Hello, we would like to create a cone aim effect similar to Brawl Stars where the cone of the aim is cut in the point it collides with something.
Example:
Any ideas on how we could do that?
Thank you,
Marco
Have an idea.
First, the zone occupied by wall be made mask, generate a mask texture.
Then, render the scan fan gameobject, dectecting whether the line between pixel and the vertex of cone is blocked (over cross a mask with the mask texture) in fragment shader stage. If true, the pixel will be ignored.