Coding problem with co-ord's along the radius of a circle

Hey guys tried implementing putting box’s along the radius of a circular orbit but having some difficulties, sorry am a newb :slight_smile:

am i doing anything obviously wrong ?

oh and the start angle would be 180 and the end angle would be 45 and tried it on different distances but nothing.


private void buildAsteroids(int d, int startAngle, int endAngle)


Node roidsNode = new Node(“roidsNode”);

Float x,z;

for(int i = startAngle ; i <= endAngle; i-=10)


x = FastMath.cos(i) * d; //see polar co ordinates converting them to cartesian ones

z = FastMath.sin(i) * d;

Box roid = new Box("mockRoid " + i,new Vector3f(x,0,z),

new Vector3f(x+1,0+1,z+1));



Box helloBox = new Box(“hello”,new Vector3f(0,0,10),

new Vector3f(1,1,11));


TextureState roidTS = display.getRenderer().createTextureState();

// Use the TextureManager to load a texture

Texture t = TextureManager.loadTexture(Game.class.getClassLoader().getResource(“GamePics/1.jpg”),



// Assign the texture to the TextureState






bit embarassing putting my code up but ah well lol,

one thing i noticed is that the many asteroids bar the “Hello” one is not being attached to the roidsNode in program output…

anyone got an idea as to the problem ?

oops i found the prob it was v minor , soz thought was much more complicated error after couldnt see it.

i put <= instead of >= lol

oops :S