Original Post
Hey! I am trying to get the location of my paddle object using the object.getLocation() command. Now, I print out the location onto the console every time the ball hits the paddle (this is just a test). The problem is, I always get the same location regardless of whether or not I move the paddle. here is the code: Am I using this function in the wrong way, or is there another way to print out the "current" location of the paddle? Thanks.
import GameLogic
import Blender
paddle = Blender.Object.Get ('Paddle')
ball = Blender.Object.Get('Ball')
cont = GameLogic.getCurrentController()
me = cont.getOwner()
bounce = cont.getSensor("touchPaddle?")
g1 = cont.getActuator("BounceOffThePaddle")
if(bounce.isPositive()):
print paddle.loc[0]