- Home /
change colliding objects size
I'm looking for something that does this:
function OnTriggerEnter (other : Collider)
{
other.gameObject.transform. //vector3? I have no idea how to make this work
}
But my code-fu isn't yet up to speed,
Comment
Best Answer
Answer by Waz · Jul 02, 2011 at 09:15 AM
other.transform.localScale = Vector3(2,2,2);
Thanks this is just what I needed. Implementing Vector3 is confusing at my level
The above code just means "set the x,y, and z scales to 2, 2, and 2". A vector3 is just a container to carry around x, y, and z floats.
Your answer
Follow this Question
Related Questions
Distance won't work 1 Answer
postion that is small number rounded to 0? 1 Answer
Clamp X position of object 1 Answer
stopping animal from growing once it reaches a certain size. 1 Answer
Return Angle as Vector 3 2 Answers