You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It's can be difficult to ensure multiple players and important objects are always visible on screen. There should be an effect to ensure a camera is positioned such that it can always see all players and important objects
Describe the solution you'd like
Create a new Effect type that takes multiple targets and weights like LookAtGroup, but ensures they're always on screen by backing up the camera enough
Describe alternatives you've considered
This might be solvable by combining "LookAtGroup" with a new Effect that just repositions itself to be far enough away that the targets are within certain bounds (eg: predetermined angles which define a view frustum).
The text was updated successfully, but these errors were encountered:
Project all the targets' positions to screenspace positions (Camera node has unproject_position(), but since we are not working with camera node it needs to be implemented via some matrix magic)
Calculate max error (how far objects are from the edges of the screen)
Do some more math magic to calculate new distance. This last step I'm not sure if I got the math right and it's a bit hard to explain, so needs some testing.
It might be possible to hack Camera.unproject_position() by temporarily setting the camera's transform, calling unproject_position, then setting its transform back. It'd at least be an easy way to get it working and it can be revisited later.
Is your feature request related to a problem? Please describe.
It's can be difficult to ensure multiple players and important objects are always visible on screen. There should be an effect to ensure a camera is positioned such that it can always see all players and important objects
Describe the solution you'd like
Create a new Effect type that takes multiple targets and weights like LookAtGroup, but ensures they're always on screen by backing up the camera enough
Describe alternatives you've considered
This might be solvable by combining "LookAtGroup" with a new Effect that just repositions itself to be far enough away that the targets are within certain bounds (eg: predetermined angles which define a view frustum).
The text was updated successfully, but these errors were encountered: