Skip to content

Particle prefab parent#10458

Open
NotGaylien wants to merge 3 commits intoFacepunch:masterfrom
NotGaylien:particle_prefab_parent
Open

Particle prefab parent#10458
NotGaylien wants to merge 3 commits intoFacepunch:masterfrom
NotGaylien:particle_prefab_parent

Conversation

@NotGaylien
Copy link
Copy Markdown

@NotGaylien NotGaylien commented Apr 12, 2026

Pull Request

Thanks for contributing to s&box ❤️
Please fill out the sections below to help us review your change efficiently.


Summary

Allows particle prefabs to parent to hit object and follow them.

Motivation & Context

Using prefabs to spawn decals / sub particle effects on moving objects, like players and cars.
this allows me to ensure they will stick to them.

Fixes: #10387

Implementation Details

Particle

  • now includes hit body reference

ParticleEffect

  • CollisionPrefab struct now includes physics body for the hit body
  • Bool to enable parenting in prefab feature
  • absolute position not true when this is enabled

Screenshots / Videos (if applicable)

BEFORE / with it disabled.

sbox-dev_Pp7p8GkaLA.mp4

AFTER

sbox-dev_0sPLg2FwsQ.mp4
sbox-dev_x9MVw7VnIS 65Juavq4Hj

Checklist

  • Code follows existing style and conventions
  • No unnecessary formatting or unrelated changes
  • Public APIs are documented (if applicable)
  • Unit tests added where applicable and all passing
  • I’m okay with this PR being rejected or requested to change 🙂

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.

Particle - CollisionPrefab parent to hit object

1 participant