# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Author Message
 Posted: Mon Sep 17, 2012 9:21 am

Joined: Mon Sep 17, 2012 8:09 am
Posts: 5
I have created a simple model (two boxes and a Generic6DofConstraint joint between them) in blender, and import it to bullet.
I want to set motor for this model in bullet, I wrote this simple code:

\\btGeneric6DofConstraint* g;
\\g=(btGeneric6DofConstraint *)m_dynamicsWorld->getConstraint(0);
\\g->getRotationalLimitMotor(0)->m_enableMotor=true;
\\g->getRotationalLimitMotor(0)->m_maxMotorForce=10;
\\g->getRotationalLimitMotor(0)->m_targetVelocity=5;

\\g=(btGeneric6DofConstraint *)m_dynamicsWorld->getConstraint(0);
\\g->getRotationalLimitMotor(1)->m_enableMotor=true;
\\g->getRotationalLimitMotor(1)->m_maxMotorForce=10;
\\g->getRotationalLimitMotor(1)->m_targetVelocity=5;

g=(btGeneric6DofConstraint *)m_dynamicsWorld->getConstraint(0);
g->getRotationalLimitMotor(2)->m_enableMotor=true;
g->getRotationalLimitMotor(2)->m_maxMotorForce=10;
g->getRotationalLimitMotor(2)->m_targetVelocity=5;

X-axis motor and y-axis motor work Well, but the z-axis motor does not work.
Does anybody have an idea where is the problem? from my blender model, or my code?

I'm very confused to using RotationalMotor even for this simple model.
In future I want to create a complex model (a Humanoid model)in blender and set it's motor controller in bullet. Is Generic6DofConstraint suitable for this work?

Thanks

Top

 Posted: Thu Sep 20, 2012 8:38 pm

Joined: Thu Mar 03, 2011 2:30 am
Posts: 6
What values are you specifying when calling setAngularLowerLimit()? I ran into a problem using btGeneric6DofConstraint when attempting to make constraint-controlled ragdoll, later realizing that the 6DOF constraint is limited to a hemisphere of motion. The Y-axis only allows +/-90 degrees of rotation. You mentioned that the Z axis is the problem, so this may not affect you, but it is something to keep in mind.

Here is the post 6DOF Constraint: Y-axis angular limit > 90 degrees?

Top

 Posted: Mon Sep 24, 2012 6:00 am

Joined: Mon Sep 17, 2012 8:09 am
Posts: 5
but my problem is in z-axis.
i set limits in blender, i dont call setAngularLowerLimit()
is any problem if i added two joins whit different axis between two bodeis?
in this way i can use x and y axis motor from one joint and a motor from another joint.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Bing [Bot], nullChar and 4 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities