A qyery about Spatial's rotation method

Hell All,

I am a new bie in game development and just started learning the trade.

In my program, I am using rotation method as:

Box box1 = new Box( new Vector3f(3,0,0), 1,2,1);

Geometry blue = new Geometry(“Box”, box1);

Node pivot = new Node(“pivot”);




now if i write




positioning of geometry is same in both cases.

Why is it so?

Can someone please throw light on it?Like what is axis of rotation etc…?

Thanks in anticipation.

With regards


You attach the blue geom to the pivot, before translating the pivot.

The blue geom just follow its parent and ends up at the exact same position. that’s why rotating one or the other ends up yielding the same result.

Translate the pivot before attaching the blue geom and it should work as you expect.

Ignore this if you already read it, but this might be of interest :


thanka a lot nehon.

but i still not clear abt rotation functionality. it rotates a spatial abt what…global coordinate or spatial’s own geometrical centre.

and how it differs from setlocalrotation?


hehe I guess you need to read this too


The rotate method will combine the given rotation with the spatial actual rotation while setLocaRotation sets the spatial rotation.

Local transforms are relative to the parent Node, world transforms are relative to the world 0,0,0 coordinates.

Thanks Nehon.