- Home /
Huge physics 2D bug, need help with a work around.
I've submitted a bug report and it got approved today.
Basically, make two game objects, add a rigidbody2D (the rigidbody is what causes the problem) and polygon collider to one of them. Make that one a child of the other. Scale the parent to -1 on x axis (any axis works). Now rotate the child and watch the collider. However, it doesn't seem like its going to be fixed anytime soon due do its priority of 7. I really need a work around, its halting any progress I can make on my game. I have a character that is composed of many polygon colliders and physics2D components so I cannot scale its parent to flip the direction he is facing. I have also tried rotating 180 degrees on the Y axis, which almost works flawlessly but the hingejoints etc only rotate around the z axis so they are unaffected by the flipping. Thanks to anyone that replies
Why a scale of -1?
I'd use another sprite for left-facing.
Can you explain your problem with the hinge joints in greater detail? It seems to me like the better course of action is to find a workaround for your hinge problem and rotate 180 degrees on y axis.
Yeah sure. So the top image is before rotating and the bottom is after rotating. The anchor and connected anchor don't get rotated properly. At least the colliders do!
Your answer
Follow this Question
Related Questions
Rigidbody Bug Fall Down 3 Answers
FreezeAll wont freeze X 0 Answers
Make a object move forwards 1 Answer
Player stuck between 2D boxcolliders 3 Answers