Eric Posted August 28, 2011 Share Posted August 28, 2011 If I create a Ball joint between two Bodies, The first body is a box with mass 1 sitting on the "Ground" I have another body that is moving past it and above it. When I create the joint how is it oriented in relation to the two Bodies? I assume the ends are at the parent and child but the Position of the "Pin" If I use Vec3(0,-1,0) Where does the pin get created? Is it local to the parent? I can't seem to get these things to work. Basically, I want the Child to kind of dangle below the Parent, allowed to swing . I hope I made sense. Any insight would be greatly appreciated. Thanks, Eric Quote Link to comment Share on other sites More sharing options...
Canardia Posted August 28, 2011 Share Posted August 28, 2011 1) A joint is always created at a absolute global position. For example, if your body is at 0,0,10, then you must create the joint also at 0,0,10, if you want the joint to be at the center of the body. 2) The pin of a joint is not a position, but a direction vector. If your ball A is a position 0,0,0, and ball B is a at positon 0,0,1, then you create a ball joint from ballA to ballB at position 0,0,0 with pin 0,0,1. It's usually good to use normalized vectors for the pin, so Length(pin)==1. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Josh Posted August 28, 2011 Share Posted August 28, 2011 The position of a joint is the point where it rotates around. If you want the child joint to swing around the parent, the joint position should be the same as the parent's global position. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.