I have an actor when added to the game gets stored into a map with the actors attributes being stored as the map’s values and the actor’s spawn location as the key. This is so later when the player saves the game the contents of the map can be stored in the save game ref and later loaded.
The problem I’m having is that when the actor is relocated, I search the map for a vector that exists in the same spot that the actor was first located so that I may remove it and put in an updated entry, and while these vectors are shown as identical in a print string’s output, the vector is not found in the map. I have found that if I round the values of the xyz coordinates it does work, but I’m worried that’s not a great solution.
I’m considering overhauling the whole save system for these actors so that the key is not a vector because I don’t know if I my rounding procedure is going to work 100% of the time.
More information: the vector searched for is the location of the platform the actor is standing on, plus 5 to the z axis to account for it’s width. As I said, the vector that is in the map and the vector I search for are shown as identical when I use the print string function but if I do ‘is equal’ it returns false.