Skip to content

Conversation

@copperpixel
Copy link
Contributor

@copperpixel copperpixel commented Nov 10, 2025

Description

This PR updates GetRandomPointsOnControllingObjectHitBox and GetControllingObjectHitBoxInfo in CParticleSystemQuery to be able to handle particle systems attached to VGUI model panels.

Without this particle systems wouldn't attach to models correctly and Position on Model Random initializer wouldn't randomize the particle's position. Can be observed with some Unusual effects and community sparkles in TF's loadout screen and 3D class portraits on the HUD.

Before:

particlesystemquery_mdlpanel_handling_before2.webm

After:

particlesystemquery_mdlpanel_handling_after2.webm

Closes ValveSoftware/Source-1-Games#3426, closes ValveSoftware/Source-1-Games#3973

@copperpixel copperpixel changed the title all games: Add handling for particle systems on model panels in particle system query all games: Add handling for particle systems attached to model panels in particle system query Nov 10, 2025
@DivaDan
Copy link

DivaDan commented Nov 10, 2025

Very nice change; how does this look for full-body unusual effects on taunts? They have a bit of a different issue, where instead of all spawning in the head bone, they spawn in some sort of root bone way behind the actual character, so I'm curious if this PR also tackles this issue

@copperpixel
Copy link
Contributor Author

copperpixel commented Nov 10, 2025

Replying to #1644 (comment)

Unfortunately no, their spawn position will still be wrong, however it will be randomized around that point now.

particlesystemquery_mdlpanel_handling_taunts.webm

@copperpixel
Copy link
Contributor Author

nvm got that fixed too

particlesystemquery_mdlpanel_handling_taunts2.webm

- cache last mdl panel bone transforms for use in particle system query
- fix m_pmatLastBoneToWorld leak
@copperpixel copperpixel marked this pull request as ready for review November 12, 2025 00:06
@DivaDan
Copy link

DivaDan commented Nov 14, 2025

Awesome, glad to see it works on unusual taunts too! Would love to see this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TF2] Unusual Bug in Loadout Menu [TF2] Community Sparkles effect does not render in 3D HUD

2 participants