Reposition object

Hello!

I’ve been playing around with the Game Engine and the python part this weekend, and I have to say I’m impressed. So much funcionallity, with such a small amount of code. Amazing!

But… Here’s my problem. How do I reposition an object based on assigned properties? I have one float for each axis, x, y and z, and I want to place the object at the xyz coordinates from my properties.

Thank you!

thing = GameLogic.getCurrentController().getOwner()
x=thing.<i>prop</i>
y=thing.<i>prop1</i>
z=thing.<i>prop2</i>
thing.setPosition([x,y,z])

where prop, prop1, prop2 are the properties.
could of course also be written as:

thing = GameLogic.getCurrentController().getOwner()
thing.setPosition([thing.<i>prop</i>,thing.<i>prop1</i>,thing.<i>prop2</i>])

Thank you very much. I didn’t think it was that easy.

It’s when you try to rotate things it gets tricky;)