Particles fail to show on Vehicle Mod Bones
lemoncity-rp opened this issue · 0 comments
lemoncity-rp commented
What happened?
Bug Description
When using StartParticleFxLoopedOnEntityBone()
to display particles on vehicle bones, the particles fail to appear if the bone has been modified using SetVehicleMod()
.
Observations:
- When modifying parts like exhausts (e.g., swapping a dual exhaust for a single exhaust), stock exhaust bones (
'exhaust', 'exhaust_1'
) still appear as valid indices even if the new part has a different bone configuration. - This behavior indicates that
SetVehicleMod()
does not update the entity's bone structure to match the new bones introduced by the modification.
Root Cause Hypothesis:
- The bone structure of the vehicle entity is not dynamically updated after applying modifications with
SetVehicleMod()
. As a result:- The old bone indices remain active and are returned by
GetEntityBoneIndexByName()
. - The particle system cannot attach to bones that are no longer valid or properly aligned with the new modification.
- The old bone indices remain active and are returned by
Expected result
SetVehicleMod() should update the bone structure
Reproduction steps
Example:
- Play a particle effect on a stock bumper (e.g.,
'bumper_r'
) usingGetEntityBoneIndexByName(ent, 'bumper_r')
. The particle displays correctly. - Replace the rear bumper with a custom bumper using
SetVehicleMod()
, then repeat the process using the same bone name ('bumper_r'
).- The particle effect no longer appears on the new bumper.
- Notably,
GetEntityBoneIndexByName()
still returns the same bone index as the stock bumper, but it no longer maps correctly to the modified bone.
Importancy
Unknown
Area(s)
FiveM, FXServer, Natives
Specific version(s)
Server 11895 windows
Additional information
No response