Skip to content

Expose static contact softness in the JavaScript bindings #998

Description

@stephenenglish

Would you be open to a small PR exposing Rapier's contact softness settings through the WASM/TypeScript bindings?

Rapier 0.35 has separate contact_softness and static_contact_softness settings. The latter makes it possible to tune contacts against fixed floors and walls without also changing contacts between dynamic bodies.

The Python bindings expose both profiles, but the JavaScript bindings currently only expose the existing contact_natural_frequency setter. There is no access to the damping ratio or to the static-contact profile.

I'd propose exposing the natural frequency and damping ratio for both profiles on IntegrationParameters, while keeping the existing setter for compatibility. This would only expose the existing core settings; it wouldn't change any defaults or solver behavior.

This came up while investigating load-bearing stacks where it would be useful to tune support-to-floor contacts separately from object-to-object contacts. Since the same control is already public in core and exposed by the Python bindings, it seems useful to make it available to JavaScript users as well.

If that API shape sounds reasonable, I'm happy to put together a small PR with the WASM/TypeScript wiring and tests.

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions