Skip to content

SixDOFConstraint: support mLimitsSpringSettings for rotations #1833

@zkrx

Description

@zkrx

I am applying a SixDOFConstraint to my bodies in order to limit the extent of the rotation among the X and Z axis. I would also like for my bodies to come back to their original rotation (0°) automatically with the help of a spring.

Unfortunately, mLimitsSpringSettings is not supported for rotations on 6DOF, only translations:

When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will pull it back. Only soft translation limits are supported, soft rotation limits are not currently supported. 

Are there any plans for supporting this? Or how can I work around this? I tried using a HingeConstraint. I could have exactly what I want one axis at a time, but not on both axis at the same time (or the body gets overconstrained and won't rotate anymore). I also tried using a SwingTwistConstraint, but it does not appear to support soft limits at all.

Cheers!

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