Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link
  • Select all the objects within the bomb's radius of influence.
  • For each object
  • Use the object position and the center of the explosion to calculate the vector of the impulse. Something like normalize(object - center).
  • Use the distance from the center of the bomb to the object to calculate the magnitude of the impulse. Something like (object - center).length
  • Apply an impulse to the objectApply an impulse to the object using the vector and magnitude found in the previous steps.

As for calculating the magnitude you can start of with simple linear falloff, then move to other formulas if you don't like the results.

  • Select all the objects within the bomb's radius of influence.
  • For each object
  • Use the object position and the center of the explosion to calculate the vector of the impulse. Something like normalize(object - center).
  • Use the distance from the center of the bomb to the object to calculate the magnitude of the impulse. Something like (object - center).length
  • Apply an impulse to the object using the vector and magnitude found in the previous steps.

As for calculating the magnitude you can start of with simple linear falloff, then move to other formulas if you don't like the results.

  • Select all the objects within the bomb's radius of influence.
  • For each object
  • Use the object position and the center of the explosion to calculate the vector of the impulse. Something like normalize(object - center).
  • Use the distance from the center of the bomb to the object to calculate the magnitude of the impulse. Something like (object - center).length
  • Apply an impulse to the object using the vector and magnitude found in the previous steps.

As for calculating the magnitude you can start of with simple linear falloff, then move to other formulas if you don't like the results.

added 7 characters in body
Source Link
House
  • 73.3k
  • 17
  • 185
  • 273
  • Select all the objects within the bomb's radius of influence.
  • For each object
  • Use the object position and the center of the explosion to calculate the vector of the forceimpulse. Something like normalize(object - center).
  • Use the distance from the center of the bomb to the object to calculate the magnitude of the forceimpulse. Something like (object - center).length
  • Apply a forcean impulse to the object using the vector and magnitude found in the previous steps.

As for calculating the magnitude you can start of with simple linear falloff, then move to other formulas if you don't like the results.

  • Select all the objects within the bomb's radius of influence.
  • For each object
  • Use the object position and the center of the explosion to calculate the vector of the force. Something like normalize(object - center).
  • Use the distance from the center of the bomb to the object to calculate the magnitude of the force. Something like (object - center).length
  • Apply a force to the object using the vector and magnitude found in the previous steps.

As for calculating the magnitude you can start of with simple linear falloff, then move to other formulas if you don't like the results.

  • Select all the objects within the bomb's radius of influence.
  • For each object
  • Use the object position and the center of the explosion to calculate the vector of the impulse. Something like normalize(object - center).
  • Use the distance from the center of the bomb to the object to calculate the magnitude of the impulse. Something like (object - center).length
  • Apply an impulse to the object using the vector and magnitude found in the previous steps.

As for calculating the magnitude you can start of with simple linear falloff, then move to other formulas if you don't like the results.

Source Link
House
  • 73.3k
  • 17
  • 185
  • 273

  • Select all the objects within the bomb's radius of influence.
  • For each object
  • Use the object position and the center of the explosion to calculate the vector of the force. Something like normalize(object - center).
  • Use the distance from the center of the bomb to the object to calculate the magnitude of the force. Something like (object - center).length
  • Apply a force to the object using the vector and magnitude found in the previous steps.

As for calculating the magnitude you can start of with simple linear falloff, then move to other formulas if you don't like the results.