A "Joint" question

Hi all.

Actually there are two questions, If you even know one of the solutions, please share your answer here.

I’ve made a movable car with UnityCar 2.1 Pro and that’s not important, the important thing is that the car body has the Rigid Body component and I wanted to add a headlight mesh as a joint component, So I assigned a fixed joint component and it works fine but there is a problem, I want the mesh vibrate (shakes or bounces) when the car hit somewhere, what should I do?

An other thing is the anchors, imagine a car with a bumper, If I hit the car in a way that the right side of bumper collide with a wall, then the right side of bumper should fall off, but if I hit the left side too, the whole bumper should detach and get free, so for this scenario I should need two anchors and a car body and a bumper, that’s okay but how should I use them to fulfill the described task?

for the headlight bobble, use spring joint instead of fixed.

for complex, multi-staged damage effect, you will probably have to have something in the script to alter the joints for every collision. You could probably link 2 objects with 2 joints for the desired effect, but Ive never tried it. I would worry about some sort of physX feedback loop, but maybe 3.3 is smarter than that.

1 Like

Thanks for your reply I will work with the spring joint and share the results but I just discovered a cool way to do so without scripting here is what I did:

  1. Added a Hinge Joint with “Spring Use Motor” enabled.
  2. Added an other Hinge Joint with “Spring Use motor” disabled and “Use limits” enabled. and added a 220 value for the break force and 200 for the torque force.

Now if the car hits somewhere, the object (in this case, a wheel that is attached to the car) will look like this:

If I add break and tuque to the first Hinge Joint with the value of minimum 240, the car will loose it’s tire when get hit agian with more speed.

The question is, is it optimized to have two Hinge Joints or not, I don’t know the answer.

Would you explain a bit more? did you mean to do what I just discovered or something else?