Skip to content

Buoyancy demo nitpick #262

@sbj42

Description

@sbj42

In the buoyancy demo, if I put the "water" plane at a different Y position, the objects float at a different depth. Try setting plane.position[1] to -1 or 1, and see where the shapes come to rest.

I believe this is because of a bug on line 89:

var height = 0 - aabb.lowerBound[1];

This is meant to compute the height of the portion of the shape's bounding box that is "underwater". I think that 0 should actually be planePosition[1], so like this:

var height = planePosition[1] - aabb.lowerBound[1];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions