Hello friends,
I can make the screen scroll to a location in the center of two objects, however I need to have the layer zoom out as they move further apart.
To scroll to center:
Scroll to position ->
Obj1.x+(obj2.x-obj1.x)*0.05
Obj1.y+(obj2.y-obj1.y)*0.05
Do I need to set an initial variable with the number Distance(obj1,x,obj1.y,obj2.x,obj2.y, then compare that with the current distance clamped so it does not get to small? I think I have the principle, but I am not sure how to do it right...
Thanks!