UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


descriptionPinch To Scale Issue EmptyPinch To Scale Issue

more_horiz
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 Smile

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);



}

}

descriptionPinch To Scale Issue EmptyRe: Pinch To Scale Issue

more_horiz
Could you please provide the TBPinchToScale script?
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply