Hello! I am trying to achieve this effect:
I want to paint a emissive line on to any surface texture that my lightsaber touches. Any idea? I think the correct way is using a decal system.
Hello! I am trying to achieve this effect:
It’s a cool effect… I’d approach it with a particle system set to emit over distance and no randomness, emit in world coordinates.
Here’s what I would try first:
For handling the start and end of drawing, I’d probably try setting the particle system emit-over-distance rate multiplier to zero or to one appropriately.
A trail renderer could do it.
Thanks guys for the quick respond. The problem with these solutions is that it does not stick to the surface. So for example if the emissive line is on a cars surface and the car moves away then the lines stays in place and is not attached to the car.
Are you making a 2D game? I only ask because the example you give is a 3D game and you’ve tagged this with “2D-Graphics” which is why it’s appearing in the 2D Product area. This should be used when using 2D features like Sprites, Sprite-Shape, Tilemap etc.
If not then it’s best not to use the 2D tags; I can remove it for you if not.
Then you could probably add a particle system as a child, emitting in local space, to any movable thing that needs this effect on it.
Instead of a known particle system the player “has” on them, they would either add or look up the particle system on whatever they’re drawing on.
Everything else would be the same I suppose. What have you tried so far?
And what about skinned mesh renderers? I think the only approach for that is using decals. Or is there maybe another, more performant way? because as i know decals are not very performant.