Help Me! I want to make a pixel fairy!

Hello! I am making a 2d platformer like game. The game starts in a dark cave with overworld light decreased. The player is with a 1 pixel size fairy.

  1. I want that fairy to glow and produce light moving in all directions. But I don’t know how to give light like effects to game objects.
  2. I want an AI script for the fairy so that she will always hover near me like an ally.
  3. The cave is divided into two because of a wall. I want one side of the cave dark and the other a little bright because of a cave entrance. Can this be done? Will a directional light collide to the wall? Will the wall prevent the lighting to reach the other side of the cave? If no, is there another way?
    Pls HELP!!!

Hey @Firetrain !

  1. Right click on your fairy GameObjectLightPoint Light. That should create a new child object with Light component. For a glow effect I’d advise looking for an asset on the Unity Asset Store.
  2. A simple way to achieve this would be to add a new child to your player object that would contain only a Transform component and place it somewhere besides your character. Then add a new script for controlling your fairy and attach it to the Fairy game object. Edit the script and write something along these lines:

` public class FairyController : MonoBehaviour
[SerializeField] private Transform targetSpot;
[SerializeField] private float moveSpeed;

private void Update()
    transform.position = Vector3.Lerp(transform.position, targetSpot.position, Time.deltaTime * moveSpeed);

} `

Now you can drag’n’drop the player’s child object to targetSpot field and experiment with moveSpeed value until you’re content with how it works.

3.If you use point lights and the wall object and its material are properly set it should work as you want it to work. Try it out in editor and go back here if you have some problems with it.

Hope that helped :slight_smile: