Joints, Constraints and Motor Help

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Kiatu24
Posts: 5
Joined: Mon Apr 25, 2011 8:25 pm

Joints, Constraints and Motor Help

Post by Kiatu24 »

Hey Norbo, first off I'd like to say that I love this physics engine. I enjoy playing around with it and it's helped me out a lot. I'm working on making a sort of animation system based on this physics engine. Everything is going very well but I've run into a weird problem and I can't seem to get it fixed.

Right now I've got a ragdoll set up and it works just fine, I've got all of the motors in place and things seem to be good there too, but my problem is that the left bicep won't move until the left forearm is moved. So like if I rotate it on the X axis, it doesn't move at all, but if I move the forearm at all, the bicep seems to snap into the right place. The way I have it set up is as follows:

The torso doesn't have a mass because I'm trying to hold it in place for the time being.
The biceps are attached to the torso using ball socket joints and powered with an angular motor.
The forearms are attached to the biceps using a revolute joint and powered with the revolute motor that comes with the joint.
The forearms and biceps have equal masses (if that matters).

The weird thing is, the right arm works just fine. But the left arm is acting up. Can you shed any light on why this might be happening?
Thanks in advance for any help.

Kiatu24
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Joints, Constraints and Motor Help

Post by Norbo »

Some setup code that I can plug into a demo and try out may help. My first guess would be something to do with activity, by the sounds of the behavior. Try setting all the dynamic entities' IsAlwaysActive to true. If that solves it, I have a pretty good idea where the problem is (it is internal).
Kiatu24
Posts: 5
Joined: Mon Apr 25, 2011 8:25 pm

Re: Joints, Constraints and Motor Help

Post by Kiatu24 »

Thank you so much, that worked perfectly. All that time trying to figure it out, and it was just one line of code lol. I really appreciate you taking the time to help me out and I'm impressed at the speed of your replies.

Thanks again,
Kiatu24
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Joints, Constraints and Motor Help

Post by Norbo »

FYI, that bug should be fixed in the latest development version. You can get it here: http://bepuphysics.codeplex.com/SourceC ... evelopment

There might be other bugs in the devleopment version though :)
Post Reply