Im trying to relocate a sprite using rand(), but it doesn't seem to work
Considering the following excerpt:
std::cout << "Relocating goal..." << std::endl;
srand((unsigned)time(NULL));
stick_x = (rand() % (640 - 32)) + 1;
stick_y = (rand() % (360 - 32)) + 1;
std::cout << "Position change..." << std::endl;
stick_sprite.setPosition(stick_x, stick_y);
X only increments by a few bits (4 or 5) and Y keeps decrementing (by, like, 30). I have no idea why. Also, this happens upon collision. However, when there is a change in position in only occurs after a second, instead on instantly.