mtasa-pAttach icon indicating copy to clipboard operation
mtasa-pAttach copied to clipboard

Refactor to use "dxDrawModel3D" instead of "createObject"

Open CrosRoad95 opened this issue 1 year ago • 12 comments

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

CrosRoad95 avatar Sep 12 '24 16:09 CrosRoad95

what is the advantage of this?

Patrick2562 avatar Sep 12 '24 16:09 Patrick2562

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

CrosRoad95 avatar Sep 12 '24 16:09 CrosRoad95

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

Patrick2562 avatar Sep 12 '24 16:09 Patrick2562

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

CrosRoad95 avatar Sep 12 '24 16:09 CrosRoad95

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

CrosRoad95 avatar Sep 12 '24 16:09 CrosRoad95

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

Patrick2562 avatar Sep 12 '24 16:09 Patrick2562

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

CrosRoad95 avatar Sep 12 '24 16:09 CrosRoad95

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

Patrick2562 avatar Sep 12 '24 16:09 Patrick2562

I highly recommend testing this, and benchmarking the comparisons

Fernando-A-Rocha avatar Sep 12 '24 18:09 Fernando-A-Rocha

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

Fernando-A-Rocha avatar Sep 12 '24 18:09 Fernando-A-Rocha

It may still be in testing, but I'll try to develop something similar to this repo

YSAFE avatar Dec 19 '24 17:12 YSAFE

The one where it appears that the gun models have dark lighting, but on other models the lighting is normal I reported the problem mtasa-blue

image

YSAFE avatar Dec 20 '24 17:12 YSAFE