-
-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new function testSphereAgainstWorld (Close #646) #3787
base: master
Are you sure you want to change the base?
Add new function testSphereAgainstWorld (Close #646) #3787
Conversation
Would it be possible to return the XYZ where the hit got detected? |
Yes, I'll add it tomorrow |
make 7 arguments in total: |
Personally, I don’t see anything difficult in using functions like processLineOfSight, which return multiple values. You just need to familiarize yourself with the syntax and the example on the wiki. It doesn't cause any problems, errors, huge and difficult bugs, or any other made-up issues |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you solve TheNormalnij's request, then everything's fine
This PR adds a new function
testSphereAgainstWorld
, which allows checking if there are any obstacles within a given radius.Syntax
hit - Indicates whether a collision was detected.
hitElement - The element that was detected. If it wasn't created in MTA, it will be nil.
elementPositionX, elementPositionY, elementPositionZ - World position of the detected element
elementRotationX, elementRotationY, elementRotationZ - World rotation of the element
modelID - The ID of the element.
lodID - The ID of the element's LOD (or 0).
entityType - The type of the element (building, vehicle, ped, object, dummy)
The
modelID
,lodID
, andentityType
parameters are returned even ifhitElement
is nil.Closes #646