Skip to content

How to set a Constraint ? #90

Answered by codynova
Franckapik asked this question in General
Discussion options

You must be logged in to vote

Hey @Franckapik, it looks like you got it figured out, but you had the useHingeConstraint function signature wrong. It should be:

useHingeConstraint(bodyA, bodyB, options, deps)

These are described in the readme under the API section. It would probably be a good idea to mention the examples directory in the readme too.

function useHingeConstraint(
  bodyA: React.MutableRefObject<THREE.Object3D>,
  bodyB: React.MutableRefObject<THREE.Object3D>,
  optns: HingeConstraintOpts,
  deps: any[] = [],
): ConstraintApi

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by stockhuman
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #90 on June 23, 2020 00:44.