You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Entity:SetSurroundingBoundsType(BOUNDS_HITBOXES) is run on an entity, attached PCF particle effects using operator Movement Lock to Bone will be disconnected from the position of the model, and will instead appear slightly ahead of its current position, both from the movement of the entity itself, and from the bone movements of its animation.
If the entity is also playing an animation layer with Entity:AddLayeredSequence, this bug happens all the time, but if it isn't playing an animation layer, the bug only seems to occur when the entity's angles are changing.
Here's the code for the test entity I've been using to narrow down the bug, I've confirmed it on both the main branch and dev branch.
AddCSLuaFile()
ENT.Base = "base_gmodentity"
ENT.AutomaticFrameAdvance = true
ENT.Spawnable = true
function ENT:Initialize()
self:SetModel("models/player/scout.mdl")
if SERVER then
self:ResetSequence(self:LookupSequence("airwalk_loser"))
self:SetPlaybackRate(1)
self:AddLayeredSequence(self:LookupSequence("gesture_primary_go"), 1) //without this line, the bug only occurs when the ent rotates
//self:Ignite(math.huge) //alternative to CreateParticleEffect below
elseif CLIENT then
self:CreateParticleEffect("burningplayer_blue", {
{entity = self, attachtype = PATTACH_ABSORIGIN_FOLLOW}
})
end
self:SetCollisionBounds(Vector(-3,-3,-3),Vector(3,3,3)) //collision bounds that don't match hitbox bounds, to necessitate BOUNDS_HITBOXES
self:SetSolid(SOLID_BBOX)
self:SetMoveType(MOVETYPE_NONE)
self:SetSurroundingBoundsType(BOUNDS_HITBOXES)
end
function ENT:Think()
self:NextThink(CurTime())
return true
end
2024-10-12.15-47-31.mp4
There's definitely something more going on internally beyond the PCF effects, because it also A: affects the bone positions shown by the Easy Entity Inspector addon, and B: doesn't need the animation layer or angle change to cause the bug if the Easy Entity Inspector is hovering over the model, but that's all beyond what I've been able to look into so far.
Huh it's a very freaky thing. And maybe it has something to do with prediction? If player holds the entity while in noclip, the glitch disappears, step on the ground and it happens again.
The shift of all particles occurs only if MOVETYPE_NONE, but the position relative to the bones is still incorrect in all other move types.
When Entity:SetSurroundingBoundsType(BOUNDS_HITBOXES) is run on an entity, attached PCF particle effects using operator Movement Lock to Bone will be disconnected from the position of the model, and will instead appear slightly ahead of its current position, both from the movement of the entity itself, and from the bone movements of its animation.
If the entity is also playing an animation layer with Entity:AddLayeredSequence, this bug happens all the time, but if it isn't playing an animation layer, the bug only seems to occur when the entity's angles are changing.
Here's the code for the test entity I've been using to narrow down the bug, I've confirmed it on both the main branch and dev branch.
2024-10-12.15-47-31.mp4
There's definitely something more going on internally beyond the PCF effects, because it also A: affects the bone positions shown by the Easy Entity Inspector addon, and B: doesn't need the animation layer or angle change to cause the bug if the Easy Entity Inspector is hovering over the model, but that's all beyond what I've been able to look into so far.
2024-10-12.16-22-48.surroundingbounds.bug.inspector2.mp4
The text was updated successfully, but these errors were encountered: