Simulate the insertion of an object into a set of shapes
Posted: 15 Jan 2020, 13:01
Hi,
I would like to dynamically simulate the insertion of a shape into a multi-layer object. In particular, I'm trying to simulate a "rupture" event of the collision, e.g., due to a sufficiently high resulting contact force. As a result of such rupture, what I would like to achieve is the inserted shape keeping moving along the original motion direction, with the physics engine not accounting the collision with that layer anymore.
From this topic, I see that I can get access to the contact points for an arbitrary pair of shapes, assumed that the physics engine is enabled, shapes are respondable and at least one of them is dynamically enabled.
While I successfully achieved this, I'm still wondering how the rupture event (meant as vanishing of the collision) can be simulated. The simplest idea would be to remove the respondable colliding layer from the simulated scene, thus avoiding the physics engine to process that contact. However, I wonder if there is a smarter way like, .e.g, changing the respondable masks of the shapes online during the simulation.
Would this be possible? If not, are there any smarter actions I can apply, that do no take into account the total removal of the object?
Thanks in advance
I would like to dynamically simulate the insertion of a shape into a multi-layer object. In particular, I'm trying to simulate a "rupture" event of the collision, e.g., due to a sufficiently high resulting contact force. As a result of such rupture, what I would like to achieve is the inserted shape keeping moving along the original motion direction, with the physics engine not accounting the collision with that layer anymore.
From this topic, I see that I can get access to the contact points for an arbitrary pair of shapes, assumed that the physics engine is enabled, shapes are respondable and at least one of them is dynamically enabled.
While I successfully achieved this, I'm still wondering how the rupture event (meant as vanishing of the collision) can be simulated. The simplest idea would be to remove the respondable colliding layer from the simulated scene, thus avoiding the physics engine to process that contact. However, I wonder if there is a smarter way like, .e.g, changing the respondable masks of the shapes online during the simulation.
Would this be possible? If not, are there any smarter actions I can apply, that do no take into account the total removal of the object?
Thanks in advance