Hello,
Since the introduction of 4.5 and 2D colliders following rotation of the rigid body I have a pretty big issue.
I’m using a 3D character model in my game and it is prepared in a way that i have to rotate it 90 degrees in Y axis, so it faces in the correct direction. I’m also using mecanim animation to move the character around.
I’m attaching 2D rigid body and 2D colliders to it, so it works with the rest of my 2D game. The colliders are used for physics as well as for input detection.
It used to work fine until 4.5 changed the behaviour of colliders attached to rigid bodies.
In the new version my colliders are rotated together with the model, and since they are 2D, the resulting width is nil.
It’s pretty darn hard to hit the colliders with touch or mouse event now.
Does anyone know of a simple solution to this?
So far i’ve tried a few things:
- moved the rigidbody and colliders to a parent object
the result is that the child containing the animator is moving, but the parent stays in place, and the physics is calculated for the parent - as above, but also move animator to the parent
animation does not move the object at all - moved the colliders to a child object and rotate them -90 degrees in Y axis
does not work - the colliders follow the parent rigid body orientation and ignore the fact they are in a different object with different rotation - The only other solution that came to my mind was to create a separate object with a rigid body and link it to my character with a joint, but I can’t seem to find any non stretchable joint that would propagate a collision from one rigid body to the other.
Am I missing something here?
I know the best solution would be to rotate the model before exporting, but that’s not really an option for me.