Question by
JohnDevince · Jan 17, 2017 at 07:52 AM ·
transform.
2D Local Scaling Stretches Game Object
Hello! I am new to programming and unity in general, so any tips on my ugly code would be greatly appreciated. I am trying to make my "Player" on, colliding with an addition blob, grow. However the scaling is very odd and causes inconsistent changes in width. I also tried using just integers instead of floats. Any help would be much appreciated!
public class Scale : MonoBehaviour
{
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void OnTriggerEnter2D(Collider2D Addition)
{
transform.localScale += new Vector3(.3f, .15f);
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612104830im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rotate 3d character in 2d space 0 Answers
,Drag and Drop game 0 Answers
Pinball Movement not stopping when using localPosition 0 Answers