Z
zennysquid
Guest
So I am having my camera in between the center of the room and the mouse, but it can go way far out of the room, I have some code that stops it before it goes out of the room but it makes it stop instantly and it looks bad. How would I make it smoothly stop outside of the room? Like have it move less the farther away the mouse is from the center.
Above is the code I use for the camera.
Code:
view_xview = lerp(view_xview,mouse_x-(view_hview[0]/2),.05)
view_yview = lerp(view_yview,mouse_y-(view_hview[0]/2),.05)