01 - CAMERA ZONES
Hi all, I carry an art background and am making a small game on my own. Its a 2D side scrolling game and Im stuck with making camera position zones.
Below is my current system and Im very new to programming.
So the game level is designed floor wise and each floor has trigger volumes that decide the CAMERA Y POSITION. The Camera X position comes from the current player X position (Camera Follow in X axis). The Z position is predefined. So I need a manager that SMOOTHLY moves the camera in the Y AXIS based on some trigger volumes.
Now ill explain my FSMs.
Firstly Im taking Trigger events from the collision volumes and sending global events.The image below is pretty self explainatory.
Then, at the main FSM, based on the event recieved by one of the trigger volumes, Im using itweenMoveTo to SMOOTHLY move the camera to its new position.
Now the problem is coming when im at the transition level of two collision volumes.
Becaus iTweenMoveTo will take some time to move the camera, it wont go back to the listener to check another trigger event. This is causing bugs when my character is jumping between two triggers at the transition level.
Could you guys please suggest me a better way do achieving this? Or correct me on my usage of states.
Thanks.