Dampen forces/collisions?

User avatar
jubei
Posts: 11
Joined: Sun Jul 24, 2011 9:29 am

Dampen forces/collisions?

Post by jubei »

I am using a 3d cursor , then moving it on boxes , making a constraint to pick them up and try to stack them.

The problem is that once I pick up a box, it just sends everything flying:
http://flickr.com/gp/jubeigr/sEi3Xj

How can I make it so that when my cursor-attached box collides with the rest it doesn't send them flying?

thanks in advance,

Jubei
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: Dampen forces/collisions?

Post by MaxDZ8 »

It looks completely normal to me.
I would try sweeping a GhostObject BEFORE moving the constraint. Then, if the GhostObject detects a hit, either ignore the movement or perhaps somehow adjust it.
But to be completely honest, I'd like to know more on this as well.
Kanttori
Posts: 38
Joined: Thu Jul 08, 2010 12:52 am

Re: Dampen forces/collisions?

Post by Kanttori »

Hi,

I'd probably just make the boxes weigh more (maybe make the picked up box weigh less) and have the cursor pick up the box with a gap (not at the object center, a little above) so the box doesn't follow the cursor 1:1. After that maybe try to make the constraint a little less harsh by setting m_impulseClamp.
User avatar
jubei
Posts: 11
Joined: Sun Jul 24, 2011 9:29 am

Re: Dampen forces/collisions?

Post by jubei »

I have made the picked up box weight less but that had no effect other than when I drop the box, it drops slowly. I will try to find out how to "loosen" the constraint. Any other ideas would also be very welcome!
User avatar
jubei
Posts: 11
Joined: Sun Jul 24, 2011 9:29 am

Re: Dampen forces/collisions?

Post by jubei »

Kanttori wrote:Hi,

I'd probably just make the boxes weigh more (maybe make the picked up box weigh less) and have the cursor pick up the box with a gap (not at the object center, a little above) so the box doesn't follow the cursor 1:1. After that maybe try to make the constraint a little less harsh by setting m_impulseClamp.
I can't find that impulseClamp thingie on the constraint class (or any other for that matter). Care to elaborate?
Kanttori
Posts: 38
Joined: Thu Jul 08, 2010 12:52 am

Re: Dampen forces/collisions?

Post by Kanttori »

Sorry, just assumed you were using btPoint2PointConstraint; m_impulseClamp is a part of btConstraintSetting which is used as btPoint2PointConstraint::m_settings. Constraints also have the ERP and CFM you can play around with via setParam (thus far found best explanation for them in ode manual @ http://opende.sourceforge.net/wiki/inde ... (Concepts) ).