If I am doing a co-op game, is there a way to make the camera be shared between two characters? To elaborate, I mean by when 1 character moves left and the other to the right, it either zooms out or something happens for it to see both?
You would probably want to do a lot of customizations to my code but heres what you do.
First, you find the pos x and y of the camera that is between both of them.
This is easily done by using the midpoint formula ((x1+x2)/2,(y1 + y2))
Midpoint x (camera x) = (x pos of first player + x pos of second player)/2
Midpoint y (camera y) = (y pos of first player + y pos of second player)/2
Zoom can be customized but the best way to do it is to just set the zoom to (d meaning distance)
100-(d/12) and filtering if it’s less than 5 and just stopping it there.
two subject camera example. @Samuel_PixelPizza summoning.
Hey, yeah, the two subject cameras could work here
Thanks for the summon @117JOJO ahahha
Where you can navigate through all the cameras. Open the editor to check/copy the code and import it into your game
Very helpful thank you
I also have an example for a 2 subject camera:
Flowlab Game Creator - 2 Subject Camera
By the way, multiplayer wont work. But i suppose you can play it with different keys each player but only people in their home.