- Home /
Multiplying Integer value to transform.localScaleY position
I need to multiply 2 to transform.localscale(transform.localscale * 2)
In Java Script: ; enter code heretransform.localScale = Vector3.one scale; transform.localScale.y = 2;
How could i convert this into C# ?
Help me to solve this problem. Thanks in advance
Comment
Answer by CodeMasterMike · Nov 20, 2012 at 10:38 AM
Try this:
transform.localScale = Vector3.one * scale;
transform.localScale = new Vector3(transform.localScale.x, (transform.localScale.y * 2.0f), transform.localScale.z);
Good luck!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
what if i cannot find the start using unity button? 1 Answer
My mind is going to quit my body. C# 1 Answer
How to make different walk sounds 2 Answers
find GUIText 1 Answer