Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Move camera to object #709

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

ampersand38
Copy link
Member

@ampersand38 ampersand38 commented Feb 15, 2023

When merged this pull request will:

  • Add setting for alternate mode for Move camera to selected entity key, with object selected
  • Alternate mode is a consistent 20 m above and behind the object, centered on object
  • CQB mode moves camera to top-rear of object bounding box, angled so horizon is in view, useful when unit is inside multi-floor structure
  • Repeated keypresses switch between modes
  • https://youtu.be/rDQBczozoaw
  • Behaviour for waypoints and markers are not changed
    image

Alternate CQB mode for Move camera to selected entity key
CQB mode moves camera to top-rear of object bounding box
Useful when unit is inside multi-floor structure.
Repeated keypresses switch between modes
@ampersand38 ampersand38 added the enhancement Improves an existing feature label Feb 15, 2023
@mharis001
Copy link
Member

Looks like the base game keybind behaviour is still visible and there is a "flicker" before the camera is moved to the CQB view. Ideally, we should override the behaviour of the base game keybind.

@mharis001 mharis001 added this to the 1.13.0 milestone Feb 16, 2023
@ampersand38
Copy link
Member Author

Looks like the base game keybind behaviour is still visible and there is a "flicker" before the camera is moved to the CQB view. Ideally, we should override the behaviour of the base game keybind.

I can add a keybind set to block the base game key. The base game behaviour is kind of weird, it looks up at flying aircraft which is totally useless, and ends up toggling between angles on subsequent presses.
For the "far" view I would want to do something like 20 m above and behind, and centered on the object.

What do you think?

@mharis001
Copy link
Member

Yeah, that could work. Maybe also consider the size of the object and a minimum distance.

if (!isNull curatorCamera) then {
[] call FUNC(handleCuratorMoveCamTo)
};
}, {}, [DIK_F, [false, false, false]]] call CBA_fnc_addKeybind; // Default: F
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dislike adding a separate keybind. Let's use the KeyDown EH to override the vanilla keybind. If we want to make this optional, could add a setting like "Move Camera To Behaviour" - maybe 3 options: default, CQB mode, and CQB + alternative far view.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok. Should this code go in camera instead of editor?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think editor.

Copy link
Member Author

@ampersand38 ampersand38 Feb 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the setting belong under camera? see settings screenshot up top

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Normally, all the keybind handling is in editor component but I guess with the setting, it would make more sense to be under camera. Not really sure what option is the best.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I've implemented everything in editor, with the setting using the camera category.

@ampersand38 ampersand38 changed the title Add CQB mode to Move camera to selected entity key Improve Move camera to selected entity Feb 17, 2023
@ampersand38 ampersand38 changed the title Improve Move camera to selected entity Improve Move camera to object Feb 17, 2023
@mharis001 mharis001 modified the milestones: 1.13.0, 1.14.0 Mar 12, 2023
@ampersand38 ampersand38 marked this pull request as draft April 1, 2023 21:35
@ampersand38
Copy link
Member Author

ampersand38 commented Apr 1, 2023

Just noticed current method breaks vanilla lock camera to object =(
and also activates while typing in search field

@mharis001 mharis001 modified the milestones: 1.14.0, 1.15.0 May 17, 2023
@ampersand38 ampersand38 marked this pull request as ready for review October 12, 2023 17:52
@mharis001 mharis001 removed this from the 1.15.0 milestone Jul 18, 2024
@mharis001 mharis001 added this to the 1.16.0 milestone Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants