Skip to content

Conversation

tederis
Copy link
Member

@tederis tederis commented May 16, 2018

This commit brings a function isInsideColShape(colshape theColShape, float x, float y, float z) that checks if a 3D point is inside a colshape or not.

@botder botder added the enhancement New feature or request label May 16, 2018
@CrosRoad95
Copy link

CrosRoad95 commented May 17, 2018

Cool, you should add option to disable collision detection ( for specified colshape or for every colshape setColshapeDetectionEnabled(bool enable) will turn on/off collision detection ). And i think there is missing interior and dimension argument.

@tederis
Copy link
Member Author

tederis commented May 18, 2018

I will add the interior and dimension arguments. But the enabling option is some more difficult because there is new function necessity. The function setElementEnabled(element theElement, bool enabled) is can be more usefull(and more common) for not only colshape purposes, but also it can be a excessively radical novation that the MTA Team will not approve. I'll think about it.

@prnxdev
Copy link

prnxdev commented May 21, 2018

I'm not sure but is there any alternative to make this working today? Something like creating empty element (via createElement) on position x,y,z and use isElementWithinColshape and after that destroy created element.

@4O4
Copy link
Contributor

4O4 commented May 21, 2018 via email

@WhileAGO
Copy link

I'm creating something which if a object been placed on the map but not inside the ColShape it will get Auto-removed But as they said to me you can't check a static object inside a ColShape and this function isInsideColShape(colshape theColShape, float x, float y, float z) will really help to many code writers.

@Dezash
Copy link
Contributor

Dezash commented May 24, 2018

@CrosRoad95 this can be easily done using the currently available functions. This pull request is good the way it is now.

@qaisjp qaisjp merged commit 3ed17df into multitheftauto:master Jul 1, 2018
@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants