-
Notifications
You must be signed in to change notification settings - Fork 95
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
PAC doesnt follow lag compensation in TTT #1341
Comments
related garrysmod issue |
If i understand the issue correctly whats shown in the video is what you mean right? gmod_erEwwfLhcl.mp4The test code: hook.Add( "HUDPaint", "BoneExample", function()
for _, ply in ipairs( player.GetAll() ) do
if not ply:Alive() then continue end
if ply == LocalPlayer() then continue end
local bone = ply:LookupBone( "ValveBiped.Bip01_Head1" )
if not bone then continue end
local matrix = ply:GetBoneMatrix( bone )
if not matrix then continue end
local pos = matrix:GetTranslation()
local toScreen = pos:ToScreen()
draw.SimpleText( "GetBoneMatrix", "DermaDefault", toScreen.x, toScreen.y, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
local pos = ply:GetBonePosition( bone )
local toScreen = pos:ToScreen()
draw.SimpleText( "GetBonePosition", "DermaDefault", toScreen.x, toScreen.y, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
end
end ) |
Yeah, that is the problem. It looks like PAC does mainly use Entity:GetBoneMatrix, though there are a couple of spots still using Entity:GetBonePosition it seems. Those few instances are likely the cause |
Last time I looked into this, I couldn't figure out how to use GetBoneMatrix without breaking the part placement of old outfits. |
How about today? Maybe you have more ideas than back then? 😁 |
Using GetBoneMatrix seems to work fine for me, I'm not sure how old an "old outfit" would be though, the outfits that I've tried have been fine Before - pac.GetBonePosAng using GetBonePosition: After - pac.GetBonePosAng using GetBoneMatrix: (the nametags I have use GetBonePosition so you can kind of compare the difference using it) I can push/PR this to the develop branch or a new branch for further testing? |
I was told to just push it so I've pushed it to develop😁 |
Sorry for the delay, I didn't find out about it until now because I don't sync my local install. I had a tester reach out to me. This breaks clips on any valid bone. 2025-02-14.02-20-50.mp4Changing this is a serious backward compatibility problem. People do use clips on character models. So until we make a serious attempt (one that doesn't involve micro-edits but rather a fundamental look at the drawtime and bone building algorithms) at solving the whole lagging behind issue (a closely related issue that was only "solved" by trying different combinations of translucent in your hierarchy), it should be an opt-in field in the base_movable or base_drawable class. 2025-02-14.02-58-05.mp4 |
Resolves last reported problem on issue #1341
Only clip parts seem to have this issue. If they're used on a model part that parents to a bone on that model part, it lags behind for some reason. Calling SetupBones for the model before it applies the clip plane seems to resolve it. Before: After: I've made a fix in a PR you can check out before it gets merged into develop: #1391 |
To reproduce this issue, have a player wear an outfit with model parts parented to any bone of a player. Hit the player while they are moving, notice how the part are desync'd.
The text was updated successfully, but these errors were encountered: