- Home /
Difference between creating Configurable Joint in code and creating the same type of Joint in script
I created an object that adds a configurable joint to itself on run time and sets its connected body to another object in the scene. The other object is supposed to be affected by gravity and as it is falling, it is supposed to pull the object with the joint. Sounds simple and works when I do the exact same thing in the editor! Is there any difference between creating a joint at run time using scripts and creating one with the editor?
Answer by duck · Jun 07, 2010 at 04:21 PM
There should be no difference as far as I'm aware, except one - when you create the joint via code, you need to make sure you assign the connected body last of all (after setting all the other joint settings) otherwise you will get erratic results.
Think of assigning the connected body as an "Apply" button!
Thank a lot! I was doing the exact opposite! You are Awesome!!
I don't get erratic results, and I build my configurable joints via script and set the connected body first. odd.
Your answer
Follow this Question
Related Questions
Joints Configured from Script do not work properly? $20 reward 3 Answers
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
How to use multiple spring joints on the same object? 1 Answer
How to apply joint's inverse forces to another body 1 Answer