I've come across this in my main project, and have managed to recreate the problem in a small test project that I'm about to send to unity. I'd put it here but there doesn't seem to be away to add attachments (probably for the best).
Anyways, the simple case is basically a dumbell sort of shape made out of a central cube handle, with a sphere on each end. Something that looks a bit like this
either side of this object i've placed two other objects, both a cube with a sphere on top. So the setup looks a bit like this, I've labeled the parts, 1-5 beneath the diagram
These parts are
I've got 3 scripts in the world.
This setup allows me to easily turn the dumbell into something that rotates either via the rigidbody or just using the transform.
From this I have discovered that when the rigidbody is used to rotate the dumbbell the sensors on its end do not update properly. They appear where they should be in the 3d view but the sphere colliders themselves don't appear where the actual spheres appear to be. As such the sensors either end have no reaction when the visible spheres pass through them.
However, when the transform is just being used everything lines up.
As an aside if the spheres are in the dumbell hierarchy in the editor then it also works fine.
As such it appears to be that adding the sphere collider children to the parent that has a rigidbody is somehow not working properly. The spheres appear to move as part of the parent but their colliders don't.
Anyone got any thoughts on this?
asked Feb 26 '10 at 12:47 AM
While I don't fully understand the setup from your description, there is indeed a bug in Unity 2.6, which affects children of kinematic rigidbodies not properly updating their positions when the rigidbodies move, which will be fixed in 3.0. Have you reported this as a bug with a project folder? If so please let me know the case number, then I can confirm whether the 3.0 fix solves this or not.
answered Jul 15 '10 at 03:15 PM
jonas echterhoff ♦♦