Hello everyone ,
i have an issue with my pinch to scale script, on Reset button it should reset the size of the model in (2.5,2.5,2.5) which is the max value to scale, but it sets this value just for a few seconds and than it goes back to minimum size !!!
Can anyone Help me with this ? I would be grateful
This is the reset script :
using UnityEngine;
using System.Collections;
public class PinchToScale : MonoBehaviour {
float scaleAmount=1f;
Vector3 baseScale = new Vector3(2.5f,2.5f,2.5f);
void OnClick()
{
GameObject go = GameObject.Find ("Animals");
TBPinchToScale maxScaleAmount = go.GetComponent<TBPinchToScale> ();
maxScaleAmount.minScaleAmount = 1.0f;
maxScaleAmount.transform.localScale = new Vector3(2.5f,2.5f,2.5f);
}
}
i have an issue with my pinch to scale script, on Reset button it should reset the size of the model in (2.5,2.5,2.5) which is the max value to scale, but it sets this value just for a few seconds and than it goes back to minimum size !!!
Can anyone Help me with this ? I would be grateful
This is the reset script :
using UnityEngine;
using System.Collections;
public class PinchToScale : MonoBehaviour {
float scaleAmount=1f;
Vector3 baseScale = new Vector3(2.5f,2.5f,2.5f);
void OnClick()
{
GameObject go = GameObject.Find ("Animals");
TBPinchToScale maxScaleAmount = go.GetComponent<TBPinchToScale> ();
maxScaleAmount.minScaleAmount = 1.0f;
maxScaleAmount.transform.localScale = new Vector3(2.5f,2.5f,2.5f);
}
}