diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp index 39125f48e..2bb6e057e 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp +++ b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp @@ -829,20 +829,20 @@ extern "C" { * Method: setAngularFactor * Signature: (JF)V */ - JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor - (JNIEnv *env, jobject object, jlong bodyId, jfloat value) { - btRigidBody* body = reinterpret_cast(bodyId); - if (body == NULL) { - jclass newExc = env->FindClass("java/lang/NullPointerException"); - env->ThrowNew(newExc, "The native object does not exist."); - return; - } - btVector3 vec1 = btVector3(); - vec1.setX(value); - vec1.setY(value); - vec1.setZ(value); - body->setAngularFactor(vec1); - } +// JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor +// (JNIEnv *env, jobject object, jlong bodyId, jfloat value) { +// btRigidBody* body = reinterpret_cast(bodyId); +// if (body == NULL) { +// jclass newExc = env->FindClass("java/lang/NullPointerException"); +// env->ThrowNew(newExc, "The native object does not exist."); +// return; +// } +// btVector3 vec1 = btVector3(); +// vec1.setX(value); +// vec1.setY(value); +// vec1.setZ(value); +// body->setAngularFactor(vec1); +// } /* * Class: com_jme3_bullet_objects_PhysicsRigidBody diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h index d966f74e2..cb714c7bc 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h +++ b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h @@ -406,8 +406,8 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularF * Method: setAngularFactor * Signature: (JF)V */ -JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor - (JNIEnv *, jobject, jlong, jfloat); +//JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor +// (JNIEnv *, jobject, jlong, jfloat); /* * Class: com_jme3_bullet_objects_PhysicsRigidBody diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java index c8d73d249..d17b595c7 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java @@ -635,11 +635,9 @@ public class PhysicsRigidBody extends PhysicsCollisionObject { private native void getAngularFactor(long objectId, Vector3f vec); public void setAngularFactor(float factor) { - setAngularFactor(objectId, factor); + setAngularFactor(objectId, new Vector3f(factor, factor, factor)); } - private native void setAngularFactor(long objectId, float factor); - public void setAngularFactor(Vector3f factor) { setAngularFactor(objectId, factor); }