Previous code made translation for every frame, this fix the error by
making it only for the current frame