I want to make a prefab be placed wherever I look and then it grows(Ive made it grow) and once it finishes growing it is removed and gives you a higher score, My script for the grow is
`using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Size_Changer : MonoBehaviour
{
public Vector3 maxLocalScale;
float maxlocalScaleMagnitude;
void Start()
{
maxLocalScale = new Vector3(0.5F, 1, 0.5F);
maxlocalScaleMagnitude = maxLocalScale.magnitude;
}
void LateUpdate()
{
float actualLocalScaleMagnitude = transform.localScale.magnitude;
if (actualLocalScaleMagnitude < maxlocalScaleMagnitude)
{
transform.localScale += new Vector3(0.0005F, 0.001F, 0.0005F);
}
}
}`
I am also using a fps controller and I want it to place in the center.