MinieExamples/src/main/java/jme3utilities/minie/test/TargetDemo.java
/**
     * Callback invoked after adding a collision object to the PhysicsSpace.
     *
     * @param pco the object that was added (not null)
     */
Callback invoked after adding a collision object to the PhysicsSpace.

@param pco the object that was added (not null)
Callback invoked after adding a collision object to the PhysicsSpace . @param pco the object that was added ( not null )
@Override
    public void postAdd(PhysicsCollisionObject pco) {
        if (pco instanceof PhysicsRigidBody) {
            PhysicsRigidBody rigidBody = (PhysicsRigidBody) pco;
            float damping = status.damping();
            rigidBody.setDamping(damping, damping);
            float linearThreshold = 1f;
            float angularThreshold = 1f;
            rigidBody.setSleepingThresholds(linearThreshold, angularThreshold);
        }
        float friction = status.friction();
        pco.setFriction(friction);
        float restitution = status.restitution();
        pco.setRestitution(restitution);
        setDebugMaterial(pco);
        pco.setDebugMeshResolution(DebugShapeFactory.highResolution);
    }
@ Override public void postAdd ( PhysicsCollisionObject pco ) { if ( pco instanceof PhysicsRigidBody ) { PhysicsRigidBody rigidBody = ( PhysicsRigidBody ) pco ; float damping = status . damping ( ) ; rigidBody . setDamping ( damping , damping ) ; float linearThreshold = 1f ; float angularThreshold = 1f ; rigidBody . setSleepingThresholds ( linearThreshold , angularThreshold ) ; } float friction = status . friction ( ) ; pco . setFriction ( friction ) ; float restitution = status . restitution ( ) ; pco . setRestitution ( restitution ) ; setDebugMaterial ( pco ) ; pco . setDebugMeshResolution ( DebugShapeFactory . highResolution ) ; }
Callback invoked after adding a collision object to the PhysicsSpace.
Callback invoked after adding a collision object to the PhysicsSpace .