I have a very very basic question…I am unable to create a cylinder…I am using the following code snippet……no matter how I change the values I cant see a cylinder


  • To change this template, choose Tools | Templates
  • and open the template in the editor.


    package smakit.kittu;


    import com.jme3.material.Material;

    import com.jme3.scene.Geometry;

    import com.jme3.scene.shape.Cylinder;

    import com.jme3.math.ColorRGBA;


  • @author Chaitanya


    public class Tree extends SimpleApplication {

    public static void main(String[] args){

    Tree app = new Tree();

    app.start(); // start the game


    public void simpleInitApp() {

    Cylinder mesh = new Cylinder(100,100,20f,30f,true,false);

    Geometry geom = new Geometry(“Cylinder”, mesh);

    Material mat = new Material(assetManager,



    mat.setColor(“Color”, ColorRGBA.Red);




    Please please help me out

Weird, why its not showing up. The cylinder is being created, its just now showing up.(notice the Triangle count). I even tried adding a light. But, still its the same.

Wat should I do now…Is there any other way to create a cylinder

This is a pretty HUGE object. Try making it smaller and you should see it! (the entire object is surrounding the camera)

Something like this should do it: Cylinder mesh = new Cylinder(100,100,2f,3f,true,false);

fuk me…such a simple solution…thank you very much…

chaitanya-smart said:
Wat should I do now....Is there any other way to create a cylinder

Yes. 3d Modeling Software is the simplest way :P.

But my problem is …I can import from 3d modeling software but …I need to change/update radius and lenght from a cvs file

I think you can change the radius by scaling the imported cylinder at x and z axis. For the lenght, scale the y axis.