Closed ghost closed 3 years ago
onPointInOut
allows you to pass any arbitrary function to get the "point" that is being tested. In your code, you are passing in PolyZone.getPlayerPosition
, but you could just as easily do the following to instead use the soccerBall position:
pinkcage:onPointInOut(function() return GetEntityCoords(soccerBall) end, function(isPointInside, point)
if isPointInside then
DeleteObject(soccerBall)
else
print('out')
end
end)
https://github.com/mkafrin/PolyZone/wiki/ComboZone#ispointinsideonpointinoutonplayerinout
Thanks for info, will take a look at it.
Any to detect a object in zone ?
If we use example with pinckage:
https://pastebin.com/Pmz6aM7b
How can I make
soccerBall
if it's in zone ?Thanks!