Repository navigation
Conversation
Contributor
|
Would be cool to be able to set the blending factor, so with script control the anim can start with all the movement anims, and when "filter install" part of the anim start, disable it. Just an idea |
Author
|
Would make sense, i'll check if it doesn't add too much bloat. If it adds a lot i'll make it a seperate PR on top of this one. |
vacwave
marked this pull request as draft
October 17, 2026 11:24
vacwave
force-pushed
the
lock_to_camera
branch
from
October 17, 2026 15:11
9a3601a to
0a5892f
Compare
Author
|
Tested ingame on MT build, seems to work fine. Looks better when the hand isn't completely static for the whole anim. |
vacwave
marked this pull request as ready for review
October 17, 2026 15:16
Contributor
|
Would be great if you add new fields and the setter to lua_help_ex |
vacwave
force-pushed
the
lock_to_camera
branch
from
October 18, 2026 17:27
0a5892f to
9ffc6ab
Compare
Contributor
|
LGTM |
This branch has not been deployed
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.
Script hand motions
game.play_hud_motionare placed from the HUD camera, with movement layers andgame.play_hud_anmlayers applied on top. CamAttached script attachments are placed from the render camera without any of that. So when a hand motion ends where a CamAttached model takes over, like putting an item on the face, the two never line up exactly. Jump/land, sprint and walk bob, breathing and camera effectors that only move the render camera all shift the hands but not the attachment.Adds an optional
lock_to_camerakey to the motions hud section, from 0 to 1, with an optional ramp time:Scripts can also change it while the motion plays:
At 1, while the motion plays:
play_hud_anmlayers are not applied to the animated arm(s). They keep ticking, so they are back in phase when the motion ends.Between 0 and 1 the animated arm(s) blend from the normal HUD placement toward the locked one. So a motion can start with full bob and settle onto the camera before the hand-over, or start locked and let go partway through. If a motion starts locked (value above 0 and no ramp time),
hands_positionandhands_orientationapply fully from the first frame instead of blending in.Default is 0, nothing changes unless the key is set. It is read per motion and reset in
StopScriptAnim. One hand motions only lock that arm, a weapon in the other hand keeps its bob.Even slight breathing and walking puts the positions out of sync. Instead of trying to copy positions over with larger engine changes, i decided to let specific motions blend toward the render camera after the layers are applied, so the layer code itself is untouched.
This works on its own, but for a CamAttached model to line up exactly its FOV also has to match hud_fov, which is what #758 adds. Also applies cleanly to all-in-one-vs2022-wpo-mt.
Example when installing filter and spawning a model after anim, top is hud_fov changes only, bottom this PR:
filter.mp4