- Home /
Strange Rigidbody behaviour
Hi,
I've a strange problem with rigidbodies and can't find any similar posting here in the forum: So here it is:
I've setup a 2D scene with two ship-sprites (2D Toolkit) both with a polygon collider as shown in the following picture. I've rotated the view a bit (instead of top-down like in the game) to show, that the colliders should hit each other after a translation on the x axis. The smaller boxes are triggers ("Is Trigger" checked).
Both sprites have a rigidbody attached with default settings. The rigidbodies are not kinematic and without gravity. "Min penetration for penalty" is set to zero. When I start the game and translate the left ship on the x axis by applying a force it moves into the right ship just until it reaches it's center:
Has anybody an idea why the left ship doesn't stop immediately, when it reaches the collider of the right ship? The ship is moving very slowly, it's definitely not entering the other ship into a single frame.
First I thought it could be the scale, because 2D Toolkit sets the scale of the sprites to 15 for each axis if setting to pixel perfect. But even if I reset the scale to 1 for each axis the behaviour is still the same.
[2]: /storage/temp/7926-2013-02-16+11_54_29-unity+-+test.png
Update: If I set the collider to boxed, the ships doesn't overlap anymore. So it seems to be some 2D Toolkit problem.
Try doing something similar without the 2d toolkit and see if you get the same results.