Getting the floating point value from NodePath for Actor pos

Hello all,

I am trying to make a character walk when given particlar commands from the keyboard. I need to reupdate the position of the Actor at every frame.

I am trying to get the position of the Actor in x,y,z coordinates and then make the character walk in the x direction by continuously adding a stepsize to the x-coordinate value.

However, the getPos() function in Actor seems to provide a NodePath which somehow stores the x,y,z coordinates of the Actor in a format that I can’t access.

The following code is being used:

	                def moveForward(self):

I am currently printing the position of the Actor. I would like to reset the position of the Actor to:


However, I cannot get the actual x, y, and z values that will allow me to do this.

Can you please help me in finding out how this is done? Thanks a lot!



x = self.ralphActor.getX()
y = self.ralphActor.getY()
z = self.ralphActor.getZ()

they return the respective float for each coordinate