-
-
Notifications
You must be signed in to change notification settings - Fork 539
Description
Is your feature request related to a problem? Please describe.
Right now, if we want to attach a simple object like a hat or a backpack to a player, we have to rely on the old bone_attach script. We all know the struggle calculating offsets in Lua every single frame. It’s not just about the unnecessary CPU usage; it’s the "jittering" and visual lag that happens whenever a player moves or when the FPS drops. It just doesn't look professional compared to what modern engines can do.
Since we are moving towards a much more advanced version with 1.7, why not have a native function like attachElementToBone
Having this handled in C++ would be a total lifesaver. It would make everything buttery smooth, eliminate the visual lag, and we wouldn't have to keep dragging the same bone_attach resource into every single project we start. It feels like the right time to make this part of the core engine rather than relying on a "workaround" script.
What do you guys think?
Describe the solution you'd like
I’d like to see a native C++ function, for example attachElementToBone, that handles the attachment logic internally within the engine. Ideally, the function would allow us to specify the element, the target ped, the bone ID, and the relative offsets (position and rotation). By processing this at the engine level, the attachment would stay perfectly synced with the ped's bone transformations without the Lua-induced jitter we currently face.
Describe alternatives you've considered
I have tried using community-made Lua resources like bone_attach, which is currently the only available alternative. While it works for basic needs, it is heavily dependent on Lua performance and constant per-frame calculations. I’ve also considered manually calculating offsets using getPedBonePosition, but it still results in the same visual jittering and synchronization issues that only a native C++ implementation can truly fix.
Additional context
This is a long-standing request within the community. You can see the popular community workaround here: https://wiki.multitheftauto.com/wiki/Resource:Bone_attach. Adding this natively would be a huge "Quality of Life" improvement for all developers moving to version 1.7, especially for those creating highly detailed character customization systems.
Security Policy
- I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.