How to drag the camera at high x_border value

S

saito kami

Guest
I use the following code:

Code:
view_enabled = true;
view_visible[0] = true;

var width = 480, height = 270, scale = 2;

var cam = camera_create_view(0,0,width,height, 0, object0, -1, -1, 430, height/2);

view_set_camera(0, cam);

window_set_size(width*scale, height*scale);
surface_resize(application_surface, width*scale, height*scale);
From the docs i read that the last 2 arguments of camera_create_view are used to set the position where to drag the camera from, my problem is if the x_border is higher than width/2 (430 in this case), no matter how high the value are, the camera still drags at the centre.
Did i understand it wrong? or is there a problem in this code.
 

samspade

Member
I don't understand the question. You might need to explain it in more detail.

One thing to note is that if all use use is the built in functions listed, then the camera will not leave the room. If you want the camera to leave the room, then you have to manually set the position of the camera. This isn't as hard as it sounds though.

 
Top