- Home /
problem with my moving platforms in the 4.6 beta...
I downloaded the 4.6 beta today and I ran into a problem with a sidescroller I'm making. I have some moving platforms and the code I use to make my character move along with the platform what it does is making the character a child of the platform gameobject.
It worked okay until I downloaded the beta, apparently now the children take the scale size of the parent so when my character is on a platform it gets huge! (I tend to scale my platforms to different sizes for variety sake). Any way to solve this? This is the code I'm using, all help is appreciated :(
void OnCollisionStay(Collision lacolision)
{if (lacolision.gameObject.layer == 10) //10 is the layer for my platforms
{
transform.parent = lacolision.transform ;
}else {
transform.parent = null ;
}
}
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Unity 4.6 beta button with Javascript rather than C# 2 Answers
Can a beta build of Unity4.6 work on other machines? 0 Answers
Unity3D 3.5 Beta 1 Answer
How to have no alignment 4.6 GUI 0 Answers