I am currently having two problems with the parenting script in a 2D platforming game.
I have a platform(rigidbody) that is floating and rising with the water level, and whenever the character is on the platform I would make the platform the parent of the character, so now the character will rise with the platform without falling of. But then I have another rigidbody falling on the platform causing it to rotate. Once the platform is rotating due to the physics engine, the character starts to rotate with the platform, and once rotated he would stay at an angle for the rest of the level. Any solutions to this problem?
I have wrote another script to make another platform to be the parent of the character. But for some reason if Im using both scripts, only one of them will do the parenting and the other script will not. And If I use only one, once I land on the second platform my character is following the position and rotation of the old platform. What is the reason for that and how to solve this issue?
Is there other ways to accomplish what I want to do?
Any help is very much appreciated.
Thank you very much.