How to move an object around the scene

Hi newbee question

I have created a simple game with a level and a hero to move around the scene.

I have done this by creating a room from squares on one branchgraph and another branchgraph with the hero.
The hero is connected to a rotator and a translator and drawn around 0,0,0.
This way I can make the character move around the scene by translating and rotating him.

what I would like to ask is if this is the “correct” way of doing this or are there any smarter ways of doing this. None of the tutorials demonstrate anything but rotation.

thanks in advance
Michael Chester

pretty much - easiest way is to have two TG’s, one for the rotation and one for the translation (make sure that the rotation TG is the one “closer” to the model so that the model is rotated before translated).

Check the TransformGroupTree demo at http://xith.org/demo (gsg section). Plenty of rotation and translation there.

Will.

Thanks

Its nice to know that im on the right track. I did look at the transformgrouptree demo and it was from there that it guessed it.

The tutorial could use a chapter about some of the basic concepts like this, a kind if best practices. I would not mind writing that but I dont think im qualified to do it :slight_smile:

Michael Chester

no probs.

Our goal is to one day have a very small playable game as a progressive tutorial.

Will.