MinieLibrary/src/main/java/com/jme3/bullet/control/BetterCharacterControl.java
/**
     * De-serialize this Control from the specified importer, for example when
     * loading from a J3O file.
     *
     * @param importer (not null)
     * @throws IOException from the importer
     */
De-serialize this Control from the specified importer, for example when
loading from a J3O file.

@param importer (not null)
@throws IOException from the importer
De - serialize this Control from the specified importer for example when loading from a J3O file . @param importer ( not null ) @throws IOException from the importer
@Override
    public void read(JmeImporter importer) throws IOException {
        super.read(importer);
        InputCapsule capsule = importer.getCapsule(this);
        radius = capsule.readFloat(tagRadius, 1f);
        height = capsule.readFloat(tagHeight, 2f);
        mass = capsule.readFloat(tagMass, 80f);
        jumpForce = (Vector3f) capsule.readSavable(tagJumpForce,
                new Vector3f(0f, mass * 5f, 0f));
        physicsDamping = capsule.readFloat(tagPhysicsDamping, 0.9f);
        duckedFactor = capsule.readFloat(tagDuckedFactor, 0.6f);
        viewDirection = (Vector3f) capsule.readSavable(tagViewDirection,
                new Vector3f(0f, 0f, 1f));
        walkDirection = (Vector3f) capsule.readSavable(tagWalkDirection,
                new Vector3f(0f, 0f, 1f));
        rigidBody = (PhysicsRigidBody) capsule.readSavable(tagBody, null);
        Spatial controlled = getSpatial();
        rigidBody.setUserObject(controlled);
    }
@ Override public void read ( JmeImporter importer ) throws IOException { super . read ( importer ) ; InputCapsule capsule = importer . getCapsule ( this ) ; radius = capsule . readFloat ( tagRadius , 1f ) ; height = capsule . readFloat ( tagHeight , 2f ) ; mass = capsule . readFloat ( tagMass , 80f ) ; jumpForce = ( Vector3f ) capsule . readSavable ( tagJumpForce , new Vector3f ( 0f , mass * 5f , 0f ) ) ; physicsDamping = capsule . readFloat ( tagPhysicsDamping , 0.9f ) ; duckedFactor = capsule . readFloat ( tagDuckedFactor , 0.6f ) ; viewDirection = ( Vector3f ) capsule . readSavable ( tagViewDirection , new Vector3f ( 0f , 0f , 1f ) ) ; walkDirection = ( Vector3f ) capsule . readSavable ( tagWalkDirection , new Vector3f ( 0f , 0f , 1f ) ) ; rigidBody = ( PhysicsRigidBody ) capsule . readSavable ( tagBody , null ) ; Spatial controlled = getSpatial ( ) ; rigidBody . setUserObject ( controlled ) ; }
De-serialize this Control from the specified importer, for example when
 loading from a J3O file.
De - serialize this Control from the specified importer for example when loading from a J3O file .