- Home /
Sloppy HingeJoints
I am making a robotics game, and I need to be able to attach different types of objects to motors including wheels, weapons and extenders with varying colliders. Because of the varying colliders, I cannot use WheelCollider. Whenever I try to use HingeJoint or ConfigurableJoint I end up with the sloppiest results. Wheels are dangling far below their attachment point and they don't even keep the chassis from hitting the ground. Here's an example picture: ![robot][1]
The wheels in this picture all contain a ConfigurableJoint which I applied with this script:
ConfigurableJoint confJoint = grandChild.gameObject.AddComponent("ConfigurableJoint") as ConfigurableJoint;
confJoint.connectedBody = transform.root.rigidbody;
confJoint.xMotion = ConfigurableJointMotion.Locked;
confJoint.yMotion = ConfigurableJointMotion.Locked;
confJoint.zMotion = ConfigurableJointMotion.Locked;
The code is properly executed so I guess you don't need the rest of the script. [1]: /storage/temp/19000-bot_example.png
Your answer
Follow this Question
Related Questions
How do I set up a ConfigurableJoint so that it behaves just like a HingeJoint? 1 Answer
When add joints to wheelcollider then it is not collide with other collider 0 Answers
Joint system scale problems 2 Answers
OnJointBreak 1 Answer
How to gradually increase targetAngularVelocity value of a Configurable joint? 1 Answer