How to apply force to individual rigid bodies based on impact?

In summary, the conversation discusses a game developer's question on how to create a realistic simulation of a broken wall using rigidbodies and external forces. The developer has information on the force of impact and the rigidbody of the whole wall, but is unsure of how to apply forces to the individual pieces. The conversation also suggests using conservation of momentum and intuition to estimate the angular momentum of the pieces. It is mentioned that using an open source physics engine may be helpful in creating the simulation.
  • #1

I am a game developer and I am playing around with rigidbodies. I have a piece of wall which might get impact by an external force. The wall has in turn several other broken pieces (hidden for the moment) put up together to resemble this huge wall. Upon impact I switch one whole piece of wall for the individual pieces and would like to simulate that the wall is broken and subsequently forces are applied to the individual pieces. Thus creating a realistic visual appeal.

In the picture, the (a) is a whole piece which would get impact and then upon impact it would switch to (b) which in turn have to be applied the respective forces.


Now I have information from the force on impact and also the information from rigidbody of the whole piece at any point of time, till the switch.

What I am not sure is how should apply forces to the individual pieces to create the sort of realistic simulation? How should I approach it?

I hope I was clear with my scenario, resources I have and my requirement. If I am not clear at any point, please I would like to detail it.

Thank you for your time and highly appreciate it.



The External Force :
  • Source of the force
  • Position of the source of the force

The Whole Piece of Rigidbodiy:

  • mass
  • velocity
  • angular Drag
  • angular Velocity
  • center Of Mass
  • inertia Tensor
  • inertia Tensor Rotation
  • position - The position of the rigidbody.
  • rotation
Physics news on
  • #2
Well, a lot of it will depend on how exactly the impact happens. As a good general rule, I would keep conservation of momentum in mind, and don't forget to immediately start accelerating your pieces downward due to gravity.

Depending on where the impact occurs in relation to where the breaks in the wall are, you should be able to estimate the angular momentum of the pieces as well.
This will draw heavily on your intuition if you don't want to get swamped in the math.
But like I said, if the object has momentum mV before the collision, then the sum of all momenta immediately after the crash must be mV.

I would not worry about making the physics perfect, as I think it is likely that the locations and designs of the breaks will not correspond perfectly to reality either.

Hope this helps
  • #3
Rather than write one from scratch .. Is there a an open source physics engine you could use?

I don't know but perhaps have a look at some of the physics simulation programs such as..

They seem to do a reasonable job of simulating blocks being knocked over.

1. How do I determine the magnitude and direction of force needed for a specific impact?

The magnitude and direction of force needed for a specific impact can be determined using the principles of Newton's laws of motion. First, calculate the mass and velocity of the rigid body before and after the impact. Then, use the equation F = m * ∆v/∆t, where F is the force, m is the mass, and ∆v/∆t is the change in velocity. The direction of the force can be determined by the angle of impact and the direction of the velocity of the rigid body.

2. How do I apply force to a rigid body without causing damage?

To apply force to a rigid body without causing damage, it is important to consider the material properties and structural integrity of the body. The force should be applied gradually and evenly to avoid sudden impacts that could cause damage. Additionally, using materials with high tensile strength and flexibility can help minimize the risk of damage during impact.

3. Can I use the same force for different types of rigid bodies?

The same force can be used for different types of rigid bodies, but it may not have the same effect. The mass, shape, and material of the rigid body can affect how it responds to a given force. It is important to consider these factors when determining the appropriate force to apply for different types of rigid bodies.

4. How do I calculate the force needed for a specific collision scenario?

The force needed for a specific collision scenario can be calculated using the coefficient of restitution (e) and the impulse-momentum theorem. First, determine the initial and final velocities of the rigid bodies involved in the collision. Then, use the equation e = (v2f - v1f)/(v1i - v2i) to calculate the coefficient of restitution. Finally, use the impulse-momentum theorem, Favg * ∆t = m * ∆v, to calculate the force needed for the desired change in velocity.

5. How do I simulate the effects of force on rigid bodies in a virtual environment?

To simulate the effects of force on rigid bodies in a virtual environment, specialized software or game engines can be used. These tools allow for the creation of virtual rigid bodies with customizable material properties and physics simulation. By applying forces to these virtual bodies, their motion and response can be accurately simulated in a virtual environment.

Suggested for: How to apply force to individual rigid bodies based on impact?