We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Following the C++ API:
b2RevoluteJointDef jointDef; b2RevoluteJoint* joint = (b2RevoluteJoint*)myWorld->CreateJoint(&jointDef);
I have tried:
jointDef := box2d.MakeB2RevoluteJointDef() joint := (*box2d.B2RevoluteJoint)(world.CreateJoint(&jointDef))
which results in the error: cannot convert world.CreateJoint(&jointDef) (value of type box2d.B2JointInterface) to *box2d.B2RevoluteJoint
cannot convert world.CreateJoint(&jointDef) (value of type box2d.B2JointInterface) to *box2d.B2RevoluteJoint
can you give an example on how to create a joint?
The text was updated successfully, but these errors were encountered:
I have also tried:
jointDef := box2d.MakeB2RevoluteJointDef() joint := box2d.MakeB2RevoluteJoint(&jointDef)
which results in a panic: B2Assert in the second line:
panic: B2Assert
panic: B2Assert goroutine 35 [running]: github.com/ByteArena/box2d.B2Assert(...) /Users/USER/go/pkg/mod/github.com/!byte!arena/[email protected]/CommonB2Settings.go:11 github.com/ByteArena/box2d.MakeB2Joint(0x41ed6c0, 0xc000164000, 0x0) /Users/USER/go/pkg/mod/github.com/!byte!arena/[email protected]/DynamicsB2Joint.go:366 +0x296 github.com/ByteArena/box2d.MakeB2RevoluteJoint(0xc000164000, 0x0) /Users/USER/go/pkg/mod/github.com/!byte!arena/[email protected]/DynamicsB2JointRevolute.go:156 +0x55
Sorry, something went wrong.
Hi @mlg556 (or anyone), could you get it worked ? I could instantiate. However, the motor is not revolving.
No branches or pull requests
Following the C++ API:
I have tried:
which results in the error:
cannot convert world.CreateJoint(&jointDef) (value of type box2d.B2JointInterface) to *box2d.B2RevoluteJoint
can you give an example on how to create a joint?
The text was updated successfully, but these errors were encountered: