Search in sources :

Example 1 with ConeJoint

use of com.jme3.bullet.joints.ConeJoint in project jmonkeyengine by jMonkeyEngine.

the class TestRagDoll method join.

private PhysicsJoint join(Node A, Node B, Vector3f connectionPoint) {
    Vector3f pivotA = A.worldToLocal(connectionPoint, new Vector3f());
    Vector3f pivotB = B.worldToLocal(connectionPoint, new Vector3f());
    ConeJoint joint = new ConeJoint(A.getControl(RigidBodyControl.class), B.getControl(RigidBodyControl.class), pivotA, pivotB);
    joint.setLimit(1f, 1f, 0);
    return joint;
}
Also used : Vector3f(com.jme3.math.Vector3f) RigidBodyControl(com.jme3.bullet.control.RigidBodyControl) ConeJoint(com.jme3.bullet.joints.ConeJoint)

Aggregations

RigidBodyControl (com.jme3.bullet.control.RigidBodyControl)1 ConeJoint (com.jme3.bullet.joints.ConeJoint)1 Vector3f (com.jme3.math.Vector3f)1