1
1
1bd_1l_Bari2017-05-09 22:11:59
Game development
1bd_1l_Bari, 2017-05-09 22:11:59

Problem with moving platforms in 3D (Unity3D)?

Good day! I'm starting to learn Unity and, of course, there was a problem at the very beginning.
1st person game. The bottom line is that the player jumping on moving platforms, avoiding obstacles, gets to the goal. But the problem is that when the platform moves along X and the player jumps on it, he does not go along with it, but falls from it. Googled, but didn't really find an answer. I read somewhere that it is necessary to install the friction force on the platform. Installed - did not help. I read about the parent-child, but did not understand how to do it. That is, it is necessary to write in the script that when a player is on the platform, he becomes a "descendant" of the platform? If so, how? Tell me if it's not difficult.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Pogrebnyak, 2017-05-09
@1bd_1l_Bari

character.transform.SetParent(platformGameObject);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question