Page 1 of 1

resizing objects while running

Posted: Mon Oct 31, 2011 1:31 pm
by Mindrage
my addition to the physics where a object has a temprature, i made a object vaporize and create a sphere of gas that expands after a while. But i have a problem resizing objects, i know it will affect forces somehow but i dont really know how i should resize it without getting some problem with the physics.

1 the object reduses scale by mass*constant*time
2 the volume reduses with all dimentions with the constant.
3. The object dissapears after it has only a mass of 5% of the total mass.

Then gas can become hard objects if the volume gets redused to a limit~ density = 0.4~ for this substance.

How can i resize without affecting the physics alot?

Re: resizing objects while running

Posted: Mon Oct 31, 2011 6:19 pm
by Norbo
Resizing a rigid body is a form of discontinuous motion, so collision response to an object increasing in size will be 'squishy' due to the total reliance on position correction. That's the only nonobvious thing you might run into. Just keep in mind that the Sphere is a rigid object, not a gas cloud.

You may, however, not want to use an actual rigid Entity for the gas cloud, and instead just use a regular old BoundingSphere or sphere entity with collision detection/response turned off using collision rules (http://bepuphysics.codeplex.com/wikipag ... umentation).

Determining the best option would require more information about the usage and purpose.