So I just want to simply make my object (snowball I made in Blender) grow or shrink, using this test code:
public class grow : MonoBehaviour
{
Vector3 temp;
Vector3 temp2;
public Vector3 increase;
void LateUpdate()
{
if (true)
{
temp = transform.localScale + increase;
transform.localScale = temp;
}
}
}
I set the increase to (1, 1, 1) It does work and my object does grow, but when the growing is happening, my FPS drops to like 20, and that's the best it drops, using other code I tried would make it fall to 10FPS, I tried all kinds of updates and tried (if button input)s but it doesn't make a difference, also tried Time.deltatime sometimes, I guess the scale-changing is happening too fast and needs some break time between shrinks?
↧