Skip to content
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

Particles fail to show on Vehicle Mod Bones #2999

Open
lemoncity-rp opened this issue Dec 13, 2024 · 0 comments
Open

Particles fail to show on Vehicle Mod Bones #2999

lemoncity-rp opened this issue Dec 13, 2024 · 0 comments
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@lemoncity-rp
Copy link

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.

Expected result

SetVehicleMod() should update the bone structure

Reproduction steps

Example:

  1. Play a particle effect on a stock bumper (e.g., 'bumper_r') using GetEntityBoneIndexByName(ent, 'bumper_r'). The particle displays correctly.
  2. 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

@lemoncity-rp lemoncity-rp added bug triage Needs a preliminary assessment to determine the urgency and required action labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

1 participant