get & set position

hey all
How would i get an objects position, and when it colides with another
object reverse the position that i just got?

thanks
chuck

You can use an ipo.So when he collishon with the object he use the ipo.So you make an ipo where he wil start.Do you anderstand?? :smiley:

you have to use a python script:

owner = GameLogic.getCurrentController().getOwner()
pos = owner.getPosition()

not sure what you mean by reverse the position, do you mean this?:

owner = GameLogic.getCurrentController().getOwner()
pos = owner.getPosition()
owner.setPosition(-pos[0], -pos[1], -pos[2])

that will reverse its position on the game axis, with pos[0] being the X axis position, pos[1] being the Y axis position, etc.

Keith. 8)

Yeah thats what mean
one thing though when i use use the script as above it will put my player
back at the absolute 0,0,0 position:( what I need to get is the players
relitive position, for example…(“12.0, -30.0 ,0.1”) and reverse that to …
("-12.0, 30.0, -0.1") does that make any sense?

Just a simple bug. Use:

owner.setPosition([-pos[0], -pos[1], -pos[2]])