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

Fix cylinder marker has a 2D colshape instead of 3D and Fix collision radius not matching visual

Open Proxy-99 opened this issue 1 year ago • 8 comments

Fixes #516 #331 #3435 #870 using tubes for both client and server by trying to adjust the size to fit the visual and focuses on improving accuracy this PR should improve isElementWithinMarker detect

Proxy-99 avatar Jun 07 '24 10:06 Proxy-99

The spherical colshape requires a bit bigger radius than the circular one. Otherwise, there is a high chance of the miss in some of the edge conditions.

tederis avatar Jun 07 '24 12:06 tederis

My opinion is that instead of this PR it's better to extend the circle colshape and add function setColCircleHeight (as it has already done for polygons).

tederis avatar Jun 07 '24 12:06 tederis

The spherical colshape requires a bit bigger radius than the circular one. Otherwise, there is a high chance of the miss in some of the edge conditions.

the problem will need types of col which can fit into the drawn shapes correctly

and the ColCircle has no height limit it goes to infinity

see #3435

Proxy-99 avatar Jun 07 '24 12:06 Proxy-99

The spherical colshape requires a bit bigger radius than the circular one. Otherwise, there is a high chance of the miss in some of the edge conditions.

the problem will need types of col which can fit into the drawn shapes correctly of ring and arrow and cylinder

and the ColCircle has no height limit it goes to infinity

see #3435

Yeah, I see. But currently this PR is rather a temporary patch, not the comprehensive solution.

tederis avatar Jun 07 '24 12:06 tederis

@tederis I have used ColTube instead of of sphere, I did some math calculations to try to adjust the size so far I think it's good with sizes like 300 and 500 it still not perfect mta-screen_2024-06-10_22-23-26

Proxy-99 avatar Jun 10 '24 19:06 Proxy-99

@tederis I have used ColTube instead of of sphere, I did some math calculations to try to adjust the size so far I think it's good with sizes like 300 and 500 it still not perfect mta-screen_2024-06-10_22-23-26 mta-screen_2024-06-10_22-24-18

Looks pretty accurate. So maybe it's better to stick with tubes? Radiuses bigger than 100 are used rarely.

tederis avatar Jun 11 '24 04:06 tederis

I don't think that a collision must 100% match the corresponding visual part. As was mentioned above collisions are a bit larger in SA. So you can simplify the formula.

tederis avatar Jun 16 '24 14:06 tederis