MinieExamples/src/main/java/jme3utilities/minie/test/TestSoftBody.java
/**
     * Add a static cylinder to the scene, to serve as an obstacle.
     *
     * @param topY the Y coordinate of the top surface (in physics-space
     * coordinates)
     */
Add a static cylinder to the scene, to serve as an obstacle.

@param topY the Y coordinate of the top surface (in physics-space
coordinates)
Add a static cylinder to the scene to serve as an obstacle . @param topY the Y coordinate of the top surface ( in physics - space coordinates )
private void addCylinder(float topY) {
        float radius = 1f;
        float height = 0.4f;
        CollisionShape shape = new CylinderCollisionShape(radius, height,
                PhysicsSpace.AXIS_Y);
        PhysicsRigidBody cylinderBody
                = new PhysicsRigidBody(shape, PhysicsBody.massForStatic);
        Vector3f translation = new Vector3f(0f, topY - height / 2f, 0f);
        cylinderBody.setPhysicsLocation(translation);
        physicsSpace.addCollisionObject(cylinderBody);
        hiddenObjects.addException(cylinderBody);
    }
private void addCylinder ( float topY ) { float radius = 1f ; float height = 0.4f ; CollisionShape shape = new CylinderCollisionShape ( radius , height , PhysicsSpace . AXIS_Y ) ; PhysicsRigidBody cylinderBody = new PhysicsRigidBody ( shape , PhysicsBody . massForStatic ) ; Vector3f translation = new Vector3f ( 0f , topY - height / 2f , 0f ) ; cylinderBody . setPhysicsLocation ( translation ) ; physicsSpace . addCollisionObject ( cylinderBody ) ; hiddenObjects . addException ( cylinderBody ) ; }
Add a static cylinder to the scene, to serve as an obstacle.
Add a static cylinder to the scene to serve as an obstacle .