View Issue Details

IDProjectCategoryView StatusLast Update
0008505Multi Theft Auto : San AndreasScriptingpublic2018-07-21 17:21
ReporterMrTastyAssigned Toqaisjp 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version 
Target Version1.5.6Fixed in Version1.5.6 
Summary0008505: [Request] Add isPositionWithinColShape
Description

Currently, we are unable to see if a specific world XYZ is within a complex colshape such as a sphere. The possible solution is to create a dummy element and move it to a position and check if it's now within a colshpere. This is unsuitable for an onClientRender check.

Request:
bool isPositionWithinColShape ( float x, float y, float z )

TagsNo tags attached.

Relationships

child of 0003344 closed New Feature Requests Requested features tracker 

Activities

arranTuna

2014-09-01 21:33

manager   ~~0021914

"This is unsuitable for an onClientRender check."

Why can't you store the result of whether or not that point is inside the colshape or not? Unless the colshape moves, that position will always be inside or outside the colshape so it only needs to be checked once.

MrTasty

2014-09-02 13:22

viewer   ~~0021919

Well, the colshape is static - however, the position I'm checking against moves almost on each frame - this is causing some lag onto the server.

myonlake

2018-07-08 08:08

updater   ~~0026649

Merged in https://github.com/multitheftauto/mtasa-blue/commit/0a7a28a5a66cc5712f296a3b404ce9f1a4510216
Buildinfo: https://buildinfo.mtasa.com/?Author=&Branch=&Revision=12286

Drakath

2018-07-14 06:56

viewer   ~~0026692

Someone close this

Pirulax

2018-07-14 15:41

reporter   ~~0026693

I think isPositionInColShape would be a better name.
Because, the name you gave to the function sounds more like isElementInColShape.

myonlake

2018-07-14 15:43

updater   ~~0026695

@Pirulax: Qaisjp commented on the PR merge:
Sorry for the misleading branch name. I was going to rename this to queryColShapePosition as per https://bugs.mtasa.com/view.php?id=9373, but decided to keep it consistent with isInsideRadarArea

qaisjp

2018-07-14 15:58

administrator   ~~0026697

https://github.com/multitheftauto/mtasa-blue/pull/195

Issue History

Date Modified Username Field Change