feat(sitauto): improve wall-aware seated look flow with delayed post-sit orientation#4155
Open
boscv wants to merge 4 commits intoOpenKore:masterfrom
Open
feat(sitauto): improve wall-aware seated look flow with delayed post-sit orientation#4155boscv wants to merge 4 commits intoOpenKore:masterfrom
boscv wants to merge 4 commits intoOpenKore:masterfrom
Conversation
- add wall-aware sit look selection using nearest non-walkable cells in range - apply natural seated orientation (body offset + relative head direction) - defer look until after ACTION_SIT and support sitAuto_look_delay scheduling - keep sitAuto_look fallback when no wall is found
Contributor
|
Maybe the get closestWalls could be its own sub in Utils ou Field? It could be used in many other places in the code (eg. runFromTarget, which right now doesn't use nearest wall logic and can get trapped) |
Contributor
Author
CAN DO! That's a great ideia |
Refactor sit auto-look behavior to reuse generic look helpers and correct wall-relative orientation. - Simplify AI::sit look planning: - build a default look plan from sitAuto_look + sitAuto_look_delay - optionally apply wall-relative orientation when sitAuto_look_from_wall is enabled - Reuse Misc helpers for wall search and natural partial-turn direction: - getClosestWalls(from_pos, wall_range, [field_obj]) - getNaturalLookDirections(from_pos, to_pos, [current_body]) - Keep lookAtPositionNaturally behavior intact by delegating to getNaturalLookDirections and executing look only when needed. - Export new helper utilities from Misc for reuse in other flows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rework sitAuto wall-aware look behavior to make direction selection deterministic
by distance and more natural after sitting.
Before
reference for orientation.
wall setups.
After
and ties are resolved randomly among equally near candidates.
Fallbacks and safety
PS: Besides the position being changed, it will not be seen on client XKore modes (yet),
but can be checked on console using this command:
eval message "Body=$char->{look}{body} Head=$char->{look}{head}\n", "info";