- Home /
Can a jointed, non-kinematic rigidbody snap straight to a kinematic rigidbody's position?
For context: I've got a bike and a rider with matching animations. The handlebars are driven by the animations; they're childed to a bone and have a kinematic rigidbody. This is so that the fork, which has a non-kinematic rigidbody, can be attached to the handlebars via sliding joint, so as to obtain a sliding suspension; in turn, the wheel, also with a non-kinematic rigidbody, is attached to the fork via hinge joint, so that it rolls along the ground. All of that functions and no parenting is going on.
My problem is that despite explicitly locking any movement but Z-axis sliding, the fork, and with it the wheel, inexplicably trail way too far behind the handlebars. Switching the sliding joint for a fixed one nets me the same problem; this makes me think it's an intended behaviour, but it's the one glaring thing that completely kills what I'm trying to pull off. Is something out there for this? All I know is that you can't have a non-kinematic rigidbody as a child of another rigidbody and my bike has already got a non-kinematic one; the fork and wheel are separate from the bike.
Is it handled in FixedUpdate, and how is the motion driven?
No scripting at all is involved (though I did try setting the fork's interpolation to "Extrapolate," to no avail). Still, the bike is driven in FixedUpdate. The animation is controlled via blend tree.
e: Putting the bike's behaviour in Update didn't change anything.
Answer by Owen-Reynolds · Apr 27, 2014 at 03:17 AM
Well, there's no point having a regular no-joint rigidbody as a child of anything, since both the parent and rigidbody will move the object. It's not a rule, and won't cause a crash -- it just usually gives terrible results.
But, [tested, lots] having rigidbody children with joints connected to their parents works pretty well.
In theory, a handlebar with a joint to a front column should be non-childed. As the column moves, the joint does all the work of dragging the handlebars along. In practice, I think big movements confuse joints. Having the handlebars be a child and connected by a joint seems to have the parenting do the big motions, then the joint does the bobbing and bending.
Just gave a try at childing the column -- still no dice, sadly.
Your answer
Follow this Question
Related Questions
How do I move stacked cubes in a dynamic way? 0 Answers
Joint (with is kinematic) work like a child, 100% fixed, without little bounces? 0 Answers
network of rigidbodies cannot have more than one kinematic body and work well? 0 Answers
Kinematic how to know rigidbody velocity vector? 1 Answer
Using Configurable Joints to Mimic Animated Bones - rotation issue 1 Answer