Cart with RigidBody2D

Hi,

I’m having a problem with PinJoints and RigidBody2D.

I have a cart and two wheels, all of which are RigidBody2D objects. Each wheel is pinned to the cart.

The cart rolls down the hill automatically. So far, so good.

Problem:
One of the wheels moves back and forth under the cart, depending on how fast the whole cart is rolling down. I have Softness set to 0 and Bias to 0.9 for both wheels. Nevertheless, the joint seems to “stretch”, or at least the wheels aren’t absolutely fixed to the cart.

Is there a way to fix the wheels absolutely to the cart so that they only rotate?

Jeff

I’m pretty sure having rigid bodies as children of other rigid bodies is going to act up, the parent’s transform will affect the childs in a non-physical way which is against how rigid bodies should only move by physics.

1 Like

@gertkeno
Thanks! Yeah, you were right.

I had to create my RigidBodies under a parent node. My mistake was placing the two wheels under the cart. Thanks again!

Working node hierarchy: