Skip to content
This repository was archived by the owner on Jul 12, 2026. It is now read-only.

Expose impulse joint motor max force - #371

Merged
sebcrozet merged 1 commit into
dimforge:masterfrom
zdtango:codex/expose-motor-max-force
May 23, 2026
Merged

sebcrozet merged 1 commit into
dimforge:masterfrom
zdtango:codex/expose-motor-max-force

Conversation

@zdtango

@zdtango zdtango commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Expose setMotorMaxForce(maxForce) on UnitImpulseJoint for JavaScript users.

Rapier core already exposes this through set_motor_max_force, but the JS/WASM wrapper currently exposes motor model/velocity/position configuration without exposing the separate max-force setter.

Why

This lets JS users cap solver-level joint motor force/torque directly instead of approximating motor force limits outside the joint solver. It is useful for cases like vehicle wheel motors, brakes, doors, and robotics where motor targets need a finite force limit.

Changes

  • Add RawImpulseJointSet.jointSetMotorMaxForce(...) in the wasm binding layer.
  • Add UnitImpulseJoint.setMotorMaxForce(maxForce) in the TypeScript wrapper.

Validation

  • cargo check -p dimforge_rapier3d
  • cargo fmt --check -- src/dynamics/impulse_joint.rs
  • npx prettier --check src.ts/dynamics/impulse_joint.ts

@zdtango
zdtango marked this pull request as ready for review May 23, 2026 01:06
@zdtango
zdtango marked this pull request as draft May 23, 2026 01:07
@zdtango
zdtango marked this pull request as ready for review May 23, 2026 01:16
@sebcrozet
sebcrozet merged commit 6b57282 into dimforge:master May 23, 2026
6 checks passed
@sebcrozet

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants