Freeform Light2D

I wasn’t able to get the ray sprite to rotate properly for area exits that were on the north and south. I opted to add a Light 2D and use Mathf.PingPong with the intensity instead. Then I added a sorting layer to prevent the light from shining on the canopy. Hopefully it doesn’t cause any conflicting issues later :man_shrugging: but it turned out pretty well and was fairly simple to set up.

I tried a number of things in the particle system before taking the easy way out. I made a new material with a version of Ray.png rotated 90° for my North and South exits.
VerticalRay

[Edit] - The actual way to do it is shown in the Town Scene lecture and is very simple. In the particle system Renderer tab, change the Render Alignment to Local and it can then be easily rotated with the main Transform component.

1 Like

Privacy & Terms