- Home /
Question by
DiscoFever · Jan 02, 2016 at 08:17 AM ·
3dmoving platform
Moving on a moving platform; unit problem
I'm trying to make my own crossy road as an exercice. I have my player moving by 1 in each directions, all working well.
var newPos = new Vector3(transform.position.x + move, transform.position.y, transform.position.z);
I also have moving platforms; when player hits the platform it becomes a child of the platform. Problem is : when on the platform, my script which lerps to new position doesn't move by exactly 1 unit, but it's quite random.
When on a 'moving' object; what should I be using to move by 1 unit ? I have tried using "transform.localposition.x" but it does the same.
What 'obvious' thing am I missing here ?
Thanks
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612054510im_/https://answers.unity.com/themes/thub/images/avi.jpg)