- Home /
Question by
Detinator10 · Aug 20, 2014 at 02:59 AM ·
movingmoving-platformsticking
how to keep my character on a moving platform
I have a moving platform that moves using:
transform.position = Vector2.MoveTowards(this.transform.position, new Vector2(point.x,this.transform.position.y), speed*Time.deltaTime);
but, when my character stands on it he stays in one place and the platform moves from beneath him. I suspect this is because the platform is actually resetting it's position gradually instead of actually moving. Is there any way I can make him move with the platform?
Comment
Best Answer
Answer by Andres-Fernandez · Aug 20, 2014 at 07:41 AM
Two easy ways:
add platform's position to character's position
or
reparent the character transform to the platform transform
Try them and let us know.