resizing objects while running

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Mindrage
Posts: 11
Joined: Mon Oct 24, 2011 8:16 pm

resizing objects while running

Post 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?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: resizing objects while running

Post 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.
Post Reply