Same object in two places

Post Reply
Ameise
Posts: 11
Joined: Sun Oct 18, 2009 1:18 am

Same object in two places

Post by Ameise »

Hi there!

I'm trying to solve a conundrum. I have an idea which requires that a dynamic shape be present in two locations (or perhaps in two different simulations altogether, which are ticked one after another). That is, a box in two places, where anything that impacts it in one place has the exact same impact elsewhere, so that they both have the same state.

Is this plausible to do in Bullet?
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Same object in two places

Post by benelot »

That sounds like a doable thing in Bullet Physics. You can easily just take both states and mix them in some way so that the resulting state can be copied onto both. The important parameters of the boxes are linear and angular velocity. The forces applied to the boxes are then resulting accelerations, which in turn change the velocities. But what is the intention if one box is doing the opposite of the other as a reaction? I mean, if one box tilts to the left because it is about to fall from an edge and the other one is tilting opposite because it is falling from an opposing edge. Will they hold in equilibrium?

Tell me what you think.
hyyou
Posts: 96
Joined: Wed Mar 16, 2016 10:11 am

Re: Same object in two places

Post by hyyou »

I think, in benelot's scene, it should be in equilibrium.

Roughly speaking, I think OP wants a special hard (glue) constraint.
Hard constraint doesn't exist in Bullet. (Please fix me if I am wrong.)

The easiest way is what Benelot mentioned (average v,w,position,orient ?), but the result would be more physically wrong.

The closest feature is using only 1 body and exploit mask.

Eg.
All objects in the first world's mask = 0x01
All objects in the second world's mask = 0x02
The special object's mask = 0x03

btCompoundShape may be useful, but it is more tedious.

Ameise, please reply what technique you used, if you successfully implement the scene.
Post Reply