Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Linear Factor #73

Closed
moisesjpelaez opened this issue May 3, 2024 · 1 comment
Closed

Add Linear Factor #73

moisesjpelaez opened this issue May 3, 2024 · 1 comment

Comments

@moisesjpelaez
Copy link
Contributor

moisesjpelaez commented May 3, 2024

The objects already have a rotation factor and inertia. It would be nice to have linear factors as well in _applyTranslation from oimo.dynamics.rigidbody.RigidBody.

@moisesjpelaez moisesjpelaez changed the title Add angular friction to Shape and ShapeConfig Add Linear Factor May 5, 2024
@saharan
Copy link
Owner

saharan commented Jun 1, 2024

Unfortunately mass is a scalar and not a matrix like inertia moment and handling anisotropicity directly in RigidBody is difficult (for isotropic linear factor you can just change mass).
If you want to limit linear movements for some axes, you can utilize GenericJoint by setting its TranslationalLimitMotor.

e.g. to lock the X-axis of a generic joint you can genericJoint.getTranslationalLimitMotors()[0].setLimits(0, 0).

@saharan saharan closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants