FixedRevoluteJoint Sways Infinitely

Topics: User Forum
Jun 2, 2010 at 4:54 PM

Hello All,

I'm using a FixedRevoluteJoint to attach my light to the ceiling.  It works great, the light sway's just the way I want it too.  However, the light's swaying side to side doesn't seem to slow down.

I've tried upping the mass on the body which seems to just make it stiffer but I lose a bit of the response I'm after.  
I'm also using gravity when I declare the physicSym:  physicsSimulator = new PhysicsSimulator(new Vector2(0, 400));

What am I missing?  Should I be using a different type of joint?

Thank you for your help in advance!


Jun 2, 2010 at 9:26 PM

You can add a linear drag coefficient to your light, this way it should slow down over the time like if some friction would be applied to it.

Jun 2, 2010 at 9:37 PM

Hello again Pnikosis!  

I tried:

Body2.LinearDragCoefficient = Body2.Mass / 4;

Set it once during setup and forget it, it works just as I wanted.

Thanks again for your help and sorry if this has come up before, but I couldn't find anything in the forum or documentation.  Furthermore my knowledge of physics is pretty small and that's why I'm here in the first place.


Jun 3, 2010 at 6:49 AM

Nice to see it worked :)

No need to be sorry, this is a place to make engine-related questions, so just ask and hopefully someone will have the answer (most of the time). I hope we can see some screenshots or (even better) a video of your game :)

Jun 3, 2010 at 4:42 PM

Thanks again pnikosis.  Because my game is simple yet hopefully addicting, I might actually finish a game this time :)
 I'll definitely post some shots up as soon as it's out of the super double secret phase ;)  sssshhhh.