- Home /
How can I make a gameobject to scale in a single direction?
Hello
Actually I'm having a ruler all I want to do is to increase the ruler size after 10cms in that direction only by touching and dragging it after 10cm. Is it possible? Please suggest me some ideas
Thank you
do you want to increase the object size or anything else??
Hmm yes but in the x axis alone like a measuring tape I want to increase in the right side alone VIPINSIRWANI please help me with this
Note this appears to be an expansion of this question:
http://answers.unity3d.com/questions/540260/how-to-change-the-scaling-of-a-gameobject-during-r.html
In order for some to give an accurate answer for a question like this, you'd have to specify the UI and behaviors. A picture is often helpful. What specifies the start of the ruler? Does the ruler angle to match the mouse position or is it in a fixed orientation? Doe the ruler move and if so how is that related to the stretching, etc.
I'm having a ruler texture also mattssonon but I want to increase the size of the scale in the rightside x axis alone please help me
Answer by Ecoludologist · Sep 20, 2013 at 11:36 AM
Hi, If I understand your question, you just need to:
Select your object in the scene.
Click the scale button in the toolbar (the one that looks like a square with four arrows coming out of it).
Click and drag one of the arms (red for x-scale, green for y-scale, blue for z-scale) of the gizmo on the object in the scene view.
Answer by VIPINSIRWANI · Sep 20, 2013 at 03:15 PM
you can scale size via coding also like transform.localscale = new Vector3(1,1,1); I am not sure but i think this may be help you.
Your answer
Follow this Question
Related Questions
How to change the scaling of a gameobject during runtime? 2 Answers
Ragdoll 2D character controller help 0 Answers
Touch and Drag for Android problem 0 Answers
How to force Eventsystem Drag 1 Answer