ID:273958
 
For a project I'm working on, I'd like to have it so that the camera continues to remain in between the locations of 2 objects and repositions itself based on the location of those 2 objects. I'm just not entirely sure how to go about keeping a smooth transition of camera movement between the two.

How should I go about doing something like this?
When either of objects move you move the camera.
Might not be perfect, but I'm thinking your looking for something like:

var/num1 = object1.x - object2.x
var/findx = object1.x - num1/2
var/num2 = object1.y - object2.y
var/findy = object1.y - num2/2
src.client.eye = locate(findx, findy, src.z)


Then just call that every time object1 or object2 moves. From what I remember client.eye auto glides if it moves by one step (if you aren't using pixel movement). And remember to use EYE_PERSPECTIVE if your player isn't close to the objects.

I assume this is what you wanted, the only other thing I can think you want would be edge_limit.
In response to Megablaze
Nevermind guys, I figured out an alternate way of how I wanted to do things. Thanks though.