Hello!
I have an issue with my moving platforms.
I’m trying to get the player to follow the platform and not slide around.
So I’ve tried this bit of code:
void OnCollisionEnter2D(Collision2D other)
{
if (other.transform.tag == "movingPlatform")
{
player.isKinematic = true;
transform.parent = other.transform;
}
}
But as you can see in the below images, the parenting process mucks up the size of the player.
I’m not sure why because if I manually parent the player it works fine.
Any ideas as to how to fix this?