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?
ID:273958
Sep 29 2011, 3:58 pm
|
|
Sep 29 2011, 6:15 pm
|
|
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 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.
|