Yes its me again with my stupid questions
My question now I’m trying to make the character move when condition is met but when I debug it the game goes all white here code(I’m using the loop in update function):
while self.position ~= vmath.vector3(298.7503, self.position.y, self.position.z) do
self.position.x = self.position.x - 30 * dt
go.set_position(self.position)
end
You should avoid equality comparisons between floats due to floating precision.
Your text “298.7503” probably won’t be represented as that when running.
You should rather use “>” or “<” when checking such bounds.
Why are you doing that in a loop? It will not smoothly animate if that is what you are expecting. Can’t you just use go.animate()? Or do a single set_position?