I want to make a game where the player(the ball) goes into a pool of color as you can see in the picture. when the player walks he should painting the ground he is walking on. And my question is how should i realise this I tried trailrenderer and linerenderer, but it is quite messed up and I am not sure if this is a good option. I would appreciate any help.
I would make a component script called ColorTrailComponent and attach it to my player.
[RequireComponent(Transform)]
public class ColorTrailComponent : MonoBehavior
{
Transform playerTransform;
void Start()
{
playerTranform = = getComponent<Transform>();
}
void Update()
{
DrawSpot();
}
protected void DrawSpot()
{
//Use the players tranform position to draw on the gameScreen. Possibly another gameObject called
//paintSpot or something, that is just a certain colored sprite and instantiate it and place it on
//the game screen at the players location, under the player
}
}