Help to define problem with bodies and constraints.

Post Reply
AlexanderBigel
Posts: 2
Joined: Tue Jan 06, 2015 6:15 am

Help to define problem with bodies and constraints.

Post by AlexanderBigel »

I have created a target with 5 Y aligned cylinders
Hinge constraint was added to yellow cylinder for X axes on the picture
4 Pint2Point contraints connect all other cylinder to the yellow cylinder with hinge constraint.


The mass of cylinder which hinge constraint 100 times more than all other cylindes.

Centers of the cylinders placed in the circles on the picture.

Problem:
The target is stable first 5-10 seconds and then fall.
The target became stable when I removed green cylinders.

I'm working with android, picture mesh editor.
Attachments
fall object.jpg
fall object.jpg (100.52 KiB) Viewed 2294 times
AlexanderBigel
Posts: 2
Joined: Tue Jan 06, 2015 6:15 am

Re: Help to define problem with bodies and constraints.

Post by AlexanderBigel »

I'm using bullet version 2.82

On picture red cylinder body A and any green cylinder body B

in constructor

Code: Select all

btPoint2PointConstraint (btRigidBody &rbA, btRigidBody &rbB, const btVector3 &pivotInA, const btVector3 &pivotInB)
1)need to set pivot point for body A the position of the body B
body B pivot point set btVector3(0,0,0)

2)set a mass of the body A 100 times more a mass then body B

3) set inertia vector for body B btVector3(0,0,0)

In such conditions target is stable.

Problem was:

if pivot point of the body A set 0,0,0 and pivot point of the body B set vector 0-position

target does not stable

Also target does not stable if body B have inertia vector not zero.

solvation2.jpg
solvation2.jpg (113.87 KiB) Viewed 2254 times
Post Reply