I spent about 20 minutes very confused with an issue where my variable was not staying set… I was using the following code:
GameLogic.globalDict["playerPositionInit"] = own.worldPosition
After some time, I realized it was not storing the values of own.worldPosition, it was storing the actual data, so when I printed it out again, it would not print my previous worldPosition, it would print my current one.
Is there an easy way to store the values as static? I need to do math on them, so can’t do something like print()… how do I accomplish this?
The overall thing I am trying to do is calculate how far the player has moved so I can update a minimap uvs. Thanks!