Answer the question
In order to leave comments, you need to log in
How to stretch an object in Unity?
I stretch the object between 2 transforms:
desroySprite.transform.localPosition = new Vector3(transform.position.x, minY.transform.localPosition.y, transform.position.z);
desroySprite.transform.localScale = new Vector3(transform.position.x, maxY.transform.localScale.y, transform.position.z);
Answer the question
In order to leave comments, you need to log in
1. Assuming that the Pivot is in the geometric center, you calculate the average position between 2 transforms
desroySprite.transform.position = 0.5*transform1.position + 0.5*transform2.position;
desroySprite.transform.localScale = desroySprite.transform.position / N;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question