Skip to content

Creating a revolute joint? #31

@mlg556

Description

@mlg556

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

can you give an example on how to create a joint?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions