Niels
Member
Hi everyone,
I have a problem with my camera/view.
In my game the camera follows the player, but with a offset.
This way roughly 2/3th of the view is to the front of the player
example:
My camera code is the following:
This works fine except that when I change direction the camera instantly snaps to it's new position.
This gives a disorientating effect since it creates the illusion that the player himself warps from the right 3th to the left 3th of the screen.
I would like a smooth camera movement to the new position when changing direction, but I'm kinda lost in how to do this. (without using views in the room editor);
anyone care to give me some pointers?
I have a problem with my camera/view.
In my game the camera follows the player, but with a offset.
This way roughly 2/3th of the view is to the front of the player
example:
My camera code is the following:
//view[0] follows player
view_xview[0] = obj_player.x - view_wview[0] /2 + (100 * obj_player.image_xscale);
view_yview[0] = obj_player.y - view_hview[0] /1.8;
view_xview[0] = obj_player.x - view_wview[0] /2 + (100 * obj_player.image_xscale);
view_yview[0] = obj_player.y - view_hview[0] /1.8;
This works fine except that when I change direction the camera instantly snaps to it's new position.
This gives a disorientating effect since it creates the illusion that the player himself warps from the right 3th to the left 3th of the screen.
I would like a smooth camera movement to the new position when changing direction, but I'm kinda lost in how to do this. (without using views in the room editor);
anyone care to give me some pointers?