playMaker

Author Topic: Hinge joint acting springy even though no spring applied  (Read 12461 times)

jermerqua

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Hinge joint acting springy even though no spring applied
« on: July 18, 2012, 09:11:05 AM »
Imagine a basket hanging from a wheel axle... this is the effect I'm going for. I am using a Hinge joint to attach but am getting a springy effect and there is no spring applied.
a) I have a wheel that i apply force to on a platform
b) I then place an axle on the center of the wheel with "set position"
c) I then attached the basket to the axle via a hinge joint
It looks springy.

Here is what I'm talking about
http://www.youtube.com/watch?v=yEHKN7vtLJ8&feature=youtu.be
Any help appreciated. Im new but learning fast.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14057
  • Official Playmaker Support
    • View Profile
Re: Hinge joint acting springy even though no spring applied
« Reply #1 on: July 18, 2012, 10:20:04 AM »
Hi,

 I think it's quite simple in your case, you need to "stiffen" the spring settings of the hinge

http://docs.unity3d.com/Documentation/Components/class-HingeJoint.html

look for the Spring properties "spring" and "damper" and play around with these values until you achieve the stiffness you want.

 the other way is to use configurable joints, I ended up using almost exclusivly configurable joints because I could not get hinge to work as I wanted, so give that a try if you can't get anywhere.

 Check also the weight and the drag of your bucket, this might play a big role as well in this effect you are experiencing.

 bye,

 Jean

jermerqua

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Re: Hinge joint acting springy even though no spring applied
« Reply #2 on: July 18, 2012, 06:23:19 PM »
So I tinkered with the Spring properties with no luck. Then I moved onto "config joints" and learned a ton. So riht. These offer WAY more flexibility... Literally actually :-) So learned a ton but it still didn't fix the issue. Then i started figuring it may be a latent issue updating the variable that was the cause. Regardless i kind fo started from scratch, started with a couple cylinders connected, moved them around a bit to see the joint was working fine. Attached the top one back to my wheel and now it's working fine... I kind of essentially created a ball bearing and it's now working. Don't know what it was but sometimes wiping the slate clean gets it done I guess. Regardless thanks for the hook-up on Config Joints. WAY BETTER!

jermerqua

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Re: Hinge joint acting springy even though no spring applied
« Reply #3 on: July 18, 2012, 06:50:16 PM »
CORRECTION -
The last method didn't work either BUT I revisited configurable joints and My setting X,Y & ZMotion to Limited then decreasng Bounce, decreasing spring and increasing Damper I am able to get this to where I need it to be. Thank god for Configurable Joints :-)
« Last Edit: July 18, 2012, 08:47:24 PM by jermerqua »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14057
  • Official Playmaker Support
    • View Profile
Re: Hinge joint acting springy even though no spring applied
« Reply #4 on: July 18, 2012, 11:49:33 PM »
Hi,

 yes, config joints are a must.

 ok, check my sample on config joint on my excavator, you can achieve rock hard joints by also modifying the time and physics settings, namela the "solver iteration count", increase that value and you can also increase the time setting "time step" values, but that's already playing with fire as the whole physics simulation is affected, not just that particular connection:

http://www.fabrejean.net/projects/excavator/

read the thread here, it is mostly on configurable joints
http://forum.unity3d.com/threads/66871-Excavator-simulation


and that is a sample using very stiff configurable joints
http://dl.dropbox.com/u/17356625/Unity/projects/misc/simplejointdemo.unitypackage

bye,

 Jean

jermerqua

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Re: Hinge joint acting springy even though no spring applied
« Reply #5 on: July 29, 2012, 12:20:44 AM »
Sick! Love this. Thanks for sharing. Will share back once I have some good momentum on my side.