MinieExamples/src/main/java/jme3utilities/minie/test/TargetDemo.java
/**
     * Launch a new missile, its starting position and velocity determined by
     * the camera and mouse cursor.
     */
Launch a new missile, its starting position and velocity determined by
the camera and mouse cursor.
Launch a new missile its starting position and velocity determined by the camera and mouse cursor .
private void launchMissile() {
        Vector2f screenXY = inputManager.getCursorPosition();
        Vector3f nearLocation
                = cam.getWorldCoordinates(screenXY, MyCamera.nearZ);
        Vector3f farLocation = cam.getWorldCoordinates(screenXY, MyCamera.farZ);
        Vector3f direction
                = farLocation.subtract(nearLocation).normalizeLocal();
        float initialSpeed = status.missileInitialSpeed(); 
        Vector3f initialVelocity = direction.mult(initialSpeed);
        float radius = status.missileRadius(); 
        CollisionShape shape = new MultiSphere(radius);
        float mass = status.missileMass(); 
        PhysicsRigidBody body = new PhysicsRigidBody(shape, mass);
        Material debugMaterial = findMaterial("missile");
        body.setApplicationData(debugMaterial);
        body.setCcdMotionThreshold(radius);
        body.setCcdSweptSphereRadius(radius);
        body.setDebugMaterial(debugMaterial);
        body.setDebugMeshNormals(DebugMeshNormals.Sphere);
        body.setDebugMeshResolution(DebugShapeFactory.highResolution);
        body.setLinearVelocity(initialVelocity);
        body.setPhysicsLocation(nearLocation);
        addCollisionObject(body);
    }
private void launchMissile ( ) { Vector2f screenXY = inputManager . getCursorPosition ( ) ; Vector3f nearLocation = cam . getWorldCoordinates ( screenXY , MyCamera . nearZ ) ; Vector3f farLocation = cam . getWorldCoordinates ( screenXY , MyCamera . farZ ) ; Vector3f direction = farLocation . subtract ( nearLocation ) . normalizeLocal ( ) ; float initialSpeed = status . missileInitialSpeed ( ) ; Vector3f initialVelocity = direction . mult ( initialSpeed ) ; float radius = status . missileRadius ( ) ; CollisionShape shape = new MultiSphere ( radius ) ; float mass = status . missileMass ( ) ; PhysicsRigidBody body = new PhysicsRigidBody ( shape , mass ) ; Material debugMaterial = findMaterial ( "missile" ) ; body . setApplicationData ( debugMaterial ) ; body . setCcdMotionThreshold ( radius ) ; body . setCcdSweptSphereRadius ( radius ) ; body . setDebugMaterial ( debugMaterial ) ; body . setDebugMeshNormals ( DebugMeshNormals . Sphere ) ; body . setDebugMeshResolution ( DebugShapeFactory . highResolution ) ; body . setLinearVelocity ( initialVelocity ) ; body . setPhysicsLocation ( nearLocation ) ; addCollisionObject ( body ) ; }
Launch a new missile, its starting position and velocity determined by
 the camera and mouse cursor.
Launch a new missile its starting position and velocity determined by the camera and mouse cursor .
// psu per second
 // psu
 // pmu
