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

DisableMotor() method does not work in HingeConstraint. #171

Open
zhitongcui opened this issue Dec 30, 2022 · 1 comment
Open

DisableMotor() method does not work in HingeConstraint. #171

zhitongcui opened this issue Dec 30, 2022 · 1 comment

Comments

@zhitongcui
Copy link

I enable a motor when I use a HingeConstraint method. However, I can not disable the motor anymore.
Here is my code:

setTimeout(() => test(), 2000)
setTimeout(() => hingeConstraint.disableMotor(), 5000)

function test() {
hingeConstraint = constraints[0]
hingeConstraint.enableMotor()
const velocity = Math.PI / 6
hingeConstraint.setMotorSpeed(velocity)
}

I intend to let one body rotate to a specific angle. Therefore, I start a motor and then stop it. Am I understanding correct?

@zhitongcui
Copy link
Author

Look forward to your reply. Thanks!

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

1 participant