Curious behavior with a configurable joint

So in my game, I use a configurable joint on some of the ships to restrict their movement and rotation. The only time they rotate is to face the player.

basically, I restrict their movement to X Y, and restrict their rotation to Z.

Works fine in the editor. When I build and run it remotely, the movement restrictions work fine, but the rotation restrictions are all jacked up. The ships rotate in the Z and the Y sometimes, and when they do, the framerate stutters…sometimes bad enough to cause you to lose the game.

Anyone have a similar problem or any suggestions?

bump…

anyone have any ideas? is there a way to restrict slerp rotation through the code?

Did you ever get to the bottom of this I have a similar problem and I am wondering if this is a bug in Unity iPhone 1.5.

I have a ball with a rigidbody attached which I am dropping onto a wooden object created in a 3D package with both Mesh Colliders and a Kinematic rigidbody attached.

The Ball has a configurable joint that is set to the following:
XMotion: Free
YMotion: Free
ZMotion: Locked
Angular XMotion: Locked
Angular YMotion: Locked
Angular ZMotion: Free

I want the ball to be able to roll on the object on a 2d plane but not forwards and back.

The problem I have is the ball is dropping off my object because it is moving around in Z. I can see in the Editor that the Z position is constantly fluctuating.

I have no scripts attached to this ball making it move so this is all happening under the influence of physics.

Is this a bug?

There’s only two things I noticed about this issue:

  1. It only seems to appear on the actual iPhone
  2. It only happens when the framerate gets low

other than that, I never seemed to solve it.

I get the problem on the desktop too.

The ball doesn’t look like it is moving in Z from the view, but the Z position in the editor is constantly fluctuating up and down too tiny amounts.

If I rotate the mesh around the ball is resting on, eventually it will fall off.

Thanks

Do you have “Configured in World space” set on Configurable Joint

Yes, that is set to on. Here is a screenshot of all the settings:

Thanks

Anchor : {x =0, y= 0.5, z = 0}

If your object is a sphere, are you sure it is a correct place for an anchor? Shouldn’t it be in the {0,0,0} instead?

Should it not be 0.5, 0.5, 0.5 which would place the origin dead center?

I just tried 0, 0, 0 and 0.5, 0.5, 0.5 and it is the same… the Z fluctuates all over the place as soon as it touches my Mesh collider.

I am right in thinking this joint should mean Z position would stay at 0 all the time?

Thanks

OK

Just as a test I created a brand new Project with just a ball and a cube. Added a rigidbody to the sphere and a configurable joint then placed it above a cube that is titled at an angle.

When I run this scene in the Editor on Unity iPhone 1.5 with the ball selected, the Z position changes.

I have attached the scene so you can see this behavior for yourself.

I used configurable joints in the past without issue, so either its now broken in 1.5 or (more likely) I am doing something stupid.

Thanks

203424–7499–$testscene_767.unitypackage (4.94 KB)

Tried loading the same package into Unity Full (desktop) and it does the same.

Am I going mad here? I thought setting ZMotion to Locked will prevent movement in Z.

Thanks

Can anyone confirm they see the same problem with the test file supplied?

Thanks

bump

The Z coordinate of the object does seem to change but only by a very small amount. I’m not sure if this is a bug as such or just a limitation of mathematical accuracy in the joint or the collision.

Thank you very much man! That solved my issue :)… this should be on by default imho.

11 years later and the configurable joint still doesn’t make any sense. Probably why you can’t find a single unity tutorial on how to configure it. On my 12th hour and getting nowhere. Awesome.