Comparing vector problem.

[lua] elseif self.Moving then
local vector = self:GetNetworkedVector(“Moving”)
if self:GetPos() == vector then
self:ResetSequence( “idle01” )
print(“not working”)
self:ResetSequence( “walk3” )

When I try to run that the “else” is the only thing that runs because the NPC never moves to the EXACT vector that is networked, how would I add some sort of buffer/range of vectors based off the main vector, since the actual vector will never actually be reached by the NPC. Tried googling no luck, hoping there is some way to do this.

In this example the self:GetPos() was -4047.749512 -1324.523682 512.032598
and the networked vector was this. -4055.016846 -1311.282104 512.000732

self:GetPos():Distance(vector) < 10

Ah, that worked, can’t believe I didn’t think of something like that on my own now that I look at it…thanks for the help.