F
Faexie
Guest
Update: The camera actually is rotating with the player, it turns out. It's just that it's rotating around its origin at the top left corner, so it doesn't look like the player is pointing up at all times like I wanted it to. Is there a way to change the camera's origin so it's centered, or something else that would give the same effect?
I have an issue with my camera. I'm trying to make it rotate along with the player, but it doesn't seem to work... It does adjust its angle at creation, but if I rotate the player it doesn't update.
Here's the code in the end step event:
if(instance_exists(Oplayer))
{
var _x = Oplayer.x - view_width/2
var _y = Oplayer.y - view_height/2
camera_set_view_pos(view,_x,_y)
camera_set_view_angle(view,Oplayer.angle))
}
Here's the code in the end step event:
if(instance_exists(Oplayer))
{
var _x = Oplayer.x - view_width/2
var _y = Oplayer.y - view_height/2
camera_set_view_pos(view,_x,_y)
camera_set_view_angle(view,Oplayer.angle))
}
Last edited by a moderator: