• WaterPhysicsComponent (Components\PhysicsComponents\WaterVolumePhysicsComponent.cs) 
    • This component must be loaded AFTER the WaterComponent. It takes the width and length of the water plane, creates a box to fit, using the height from the component definition XML file.
    • The top of the physics box lies flat against the water plane. The box keeps track of all entities that are within it. Each frame the component calculates the amount of bouyancy of the entities within it based on how deep they are, and their density relative to the water, and applies the necessary force to make the entity float (if it should float).

Last edited Jan 5, 2012 at 6:55 AM by LordIkon, version 2


No comments yet.