

Regarding to the title, I tried to make a camera function which has 2 behaviors.
- Between room and room : Transition just like Zelda series
- In a large-sized room : Scrolls just like Mario series
However, 1.'s transition animation won't work. Screens just change instantly...
What should I do to solve this problem? Thanks in advance.



It turned out to be unexpectedly complicated.
The big problem was the timing of obtaining
get_current_rooms()
.
The room is obtained in check_room_transition()
and compared with the player's coordinates, but because it is always obtained from the current player's coordinates, there will be no difference between the room and the player no matter where you move.
For this reason, when switching to a different room, no transition occurs, and only the camera switches according to the room coordinates.
I saved the destination room along with the transition flag.
The function name was changed because the meaning changed.
get_current_rooms()
-> get_player_rooms()
The commented out parts are the parts that fix other issues.
[Please log in to post a comment]