- Home /
The question is answered, right answer was accepted
Hinge or Configurable Joint to rigidbody's certain coordinates
I am trying to joint two rigidbodies with Hinge or Configurable Joints but i need to define constant points (in object's local coordinates) for both objects. I know that a constant point for the object which applied the hinge component is already defined. But i need a constant joint point for the second object too. Is it possible an how please? And a solution for configurable joint is preferred. Thanks.
PS: Sorry for bad english...
Answer by alee26 · Aug 26, 2012 at 11:53 AM
The answer is here: first define all the coordinates of objects and distances to each other. Then use Update() function not the OnColissionEnter/Stay. Define the scripts settings seperately (sample code is below). Last use a script to create all in once. ConfigurableJoint sample setting code: SoftJointLimit limitsLow = new SoftJointLimit(); //CF x rotate limits(negatif/min) limitsLow.limit = -myObjAxisXlimit; //Predefined value limitsLow.bounciness = 0; //returns negative. limitsLow.spring = 0; limitsLow.damper = 0; trailerJoint.lowAngularXLimit = limitsLow;
Follow this Question
Related Questions
How do I use joints to make floppy physics hair on a character? 2 Answers
Configurable Joint in Script 1 Answer
Hinge Joints that Don't Limit? 0 Answers
Why Hinge Joint Component locks rigidbody transform? 1 Answer
Is it possible to use Hinge Joints to replicate a Rocker-Bogie (rover) Suspension? 0 Answers