Repository navigation
Hold verbs: aim what a socket holds (rotation on place into a socket, and on swap) - #538
Merged
Merged
Conversation
… and on swap) A place into a socket ignored `rotation`: the item always took the socket's own frame, so two items drawn differently (a musket barrel-down, a sabre tip-up) could not both point at one target from the same hand. `rotation` on a place into a socket is now the stage angle the item comes to rest at there, held relative to the socket afterwards (it turns with it); `swap` gains `rotation`, passed to its give. A place without rotation is unchanged. Contract package 1.11.0 (SwapAction gains a field: additive).
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.
Follow-up to #502 / #535, found by the studio scene re-render (a musket and a sabre in one figurine hand must both point at the opponent).
Problem
A
placeinto a socket ignoredrotation: the item always took the socket's own frame (_socket_lin). Two items drawn differently (a carved musket barrel-down-right, a carved sabre tip-up-left) then point different ways in the same hand, and the socket's frame is the node's rest frame, so authoring a rotation on the slot node does not help either.Change
PlaceAction.rotationinto a socket: the stage angle the item comes to rest at there (the same meaning the field already had for the ground andworld@x,y). From the contact on the item is held relative to the socket, so it turns with it.SwapAction.rotation(new, optional): passed to the swap's give.rotationis byte-identical.holding-things.md: the table row and a short Aiming what a socket holds note. CHANGELOG. Contract package 1.11.0 (additive field onswap).Tests
test_a_place_into_a_socket_at_a_rotation_rests_aimed_and_turns_with_the_socket(grip stays on the socket; rotation 0.6 at rest; +0.3 when the stand turns)test_a_swap_gives_at_the_rotation_it_is_givenswap(..., rotation=...).Both new tests fail with the
hold.pychange reverted (mutation-checked).https://claude.ai/code/session_013ALQpLK5gHwnn2fCni68Ut