Patrick2562 / mtasa-pAttach

Optimized bone attach thanks to the new MTA functions/events.
GNU General Public License v3.0
33 stars 15 forks source link

Refactor to use "dxDrawModel3D" instead of "createObject" #16

Open CrosRoad95 opened 1 month ago

CrosRoad95 commented 1 month ago

Simply replace objects with https://wiki.multitheftauto.com/wiki/DxDrawModel3D

Patrick2562 commented 1 month ago

what is the advantage of this?

CrosRoad95 commented 1 month ago

It may be an option to choose between "virtual objects" aka dxDrawModel, and regular, just drawing model is more performant

Patrick2562 commented 1 month ago

are you sure about this? i need to do some comparison tests

CrosRoad95 commented 1 month ago

At least you don't risk more important objects to disappear when player, element has attached many objects

CrosRoad95 commented 1 month ago

Screenshot 2023-09-03 154707 impossible to achieve using regular createObject

Patrick2562 commented 1 month ago

two modes must be used simultaneously, not just one or the other the function could be "attachVirtual" and should be synchronized between players

CrosRoad95 commented 1 month ago

It also should support attaching to vehicles ( if it is not supported yet ), i could use it for more efficient visual tuning

Patrick2562 commented 1 month ago

I assume that we will have to use "onClientRender" to render virtual objects (currently we only use "onPedsProcessed")

Fernando-A-Rocha commented 1 month ago

I highly recommend testing this, and benchmarking the comparisons

Fernando-A-Rocha commented 1 month ago

For now I think this feature is experimental because it was only reintroduced recently. Idk of production servers that use ir already