gdquest-demos / godot-kickstarter-2019

Create your Own Games with Godot, the Free Game Engine: sources from the January Kickstarter project from GDQuest
MIT License
244 stars 270 forks source link

Multi target 3d camera demo added #15

Closed guilhermehto closed 5 years ago

guilhermehto commented 5 years ago

Pretty much the same as the 2D demo, but for 3D. The camera tries to keep the same proportion you had when started the game. As before, just add the targets as children of the camera and you're set.

image

NathanLovato commented 5 years ago

Ah I see why you struggled with it: you tried to make the characters fit in a 2d rectangle. Instead I would've used something like the Pythagorean theorem to calculate how far the camera should be to have the characters on screen, based on its FOV

I'm on the train so can t test the demo now, will look at the code again now and merge if everything seems okay

NathanLovato commented 5 years ago

Looking good 🙂