i have a very weir problem.
everytime i start my game. the screen flashes several times between my scene and a black screen. then the chasecamera zooms in from a very far distance to my player.
it was fine before i organized my gamestates. but i didnt change any code.
why is this happening? :?
It might have to do with starting the game before you init your chasecamera?
darkfrog said:
It might have to do with starting the game before you init your chasecamera?
so...i should lock the game until all my game states are done loading?
By no means. :-p
You simply need to determine where this is happening and perhaps set the target on the chasecamera before you add it to the scene? Or perhaps update the chasecamera before you attach the camera to it?
my target is set during the constructor call. or do u mean set the tartget of the chasecamera before adding the target to the scene?
i update the chasecamera right after creating it. but it still doesnt work :’(
I think he means set the target before calling game.start();
adamgp said:
I think he means set the target before calling game.start();
but before game.start() gets called, the camera doesnt exist yet. so how can i create the chasecamera? :?
What darkfrog said is to update the ChaseCamera not the Camera. In this way, Chase camera will be logically initialized and prepared before the camera is attached to it, which means there would be (hopefully) no flickering.
duenez said:
What darkfrog said is to update the ChaseCamera not the Camera. In this way, Chase camera will be logically initialized and prepared before the camera is attached to it, which means there would be (hopefully) no flickering.
yes what i did was updating the chasecamera. i called chaseCam.update(0); right after i created the chasecamera object.
but the flickering is still there.
help~~~ :'(
If I were you I would try tracing the values in ChaseCamera and see what's so wacky. I don't use ChaseCamera, so I don't recall how it operates anymore.