Bugfix for Point2PointJoint's native createJoint()

Point2PointJoint’s native createJoint() method currently allocates a btHingeConstraint, while all of its other native methods cast the jointId arg to a btPoint2PointConstraint. My fix is to allocate a btPoint2PointConstraint instead and remove the transform stuff:

com_jme3_bullet_joints_Point2PointJoint.cpp:

> @@ -146,14 +146,11 @@ extern "C" {
>          jmeClasses::initJavaClasses(env);
>          btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
>          btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
> -        //TODO: matrix not needed?
> -        btMatrix3x3 mtx1 = btMatrix3x3();
> -        btMatrix3x3 mtx2 = btMatrix3x3();
> -        btTransform transA = btTransform(mtx1);
> -        jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
> -        btTransform transB = btTransform(mtx2);
> -        jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
> -        btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, transA, transB);
> +        btVector3 pivotAIn;
> +        btVector3 pivotBIn;
> +        jmeBulletUtil::convert(env, pivotA, &pivotAIn);
> +        jmeBulletUtil::convert(env, pivotB, &pivotBIn);
> +        btPoint2PointConstraint * joint = new btPoint2PointConstraint(*bodyA, *bodyB, pivotAIn, pivotBIn);
>          return reinterpret_cast<jlong>(joint);
>      }

Pull request: https://github.com/jMonkeyEngine/jmonkeyengine/pull/510

I’d recommend making a pull request here: Pull requests · jMonkeyEngine/jmonkeyengine · GitHub