Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink
Go down
Member [Lv. 0]
Member [Lv. 0]
Posts : 1
Points : 950
Rep : 0
Join date : 2015-12-13
View user profile

Pinch To Scale Issue

on Sun Dec 13, 2015 9:34 pm
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);



Posts : 76
Points : 1924
Rep : 16
Join date : 2014-06-02
Age : 15
Location : Milky Way
View user profile

Re: Pinch To Scale Issue

on Thu Dec 17, 2015 5:48 pm
Could you please provide the TBPinchToScale script?
Back to top
Permissions in this forum:
You cannot reply to topics in this forum