- Home /
how to add position delta of moving object to the player
I am working on a moving platform but when the user is on the platform he has to run with it or it will move out beneath his feet. I was wondering how to add the position delta of the platform to the player while he is on it. I know that will involve OnCollisionStay() or something. But idk how to add the position delta
when you are on platform make it player's parent. Thus it will move with platform . when not remove its parent
playergameobj.transform.parent = platformgameobj.transform for attaching and playergameobj.transform.parent = null for deteching
Your answer
Follow this Question
Related Questions
Array doesn't increase or add element 1 Answer
setting transform physics2d issue 0 Answers
How to interpret Event.current.delta? 0 Answers
Camera rotation around player while following. 6 Answers
platforme ...HELP!! POSITION ADDING 1 Answer