I am currently trying to implement moving platforms for a side-scrolling game. I am using the parenting method - this is the code I have on moving platforms:
function OnCollisionEnter(collision : Collision)
{
if(collision.rigidbody.tag == "Player")
{
collision.transform.parent = transform;
}
}
Here’s the problem - every time the ball lands on the moving platform it deforms and stretches wildly. Does anyone know how to fix this or a better way to implement moving platforms?