Enemy slides out of the window

My goblin keeps flying off the screen when I move the knight, and it doesn’t return. Is there some code I missed in one of these files?




Hello Yahmedia,

I believe you have your inputs for Vector2Subtract reversed in Enemy.cpp, try Vector2Subtract(target->getWorldPos(), screenPos);

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms