mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
improve clarity for zone methods
This commit is contained in:
1 parent
1d2c490b26
commit
7547b74dfa
1 file changed
+6
-1
@@ -6,7 +6,8 @@ import { Callout } from 'nextra/components';
|
||||
Faster alternative to PolyZone utilising [glm.polygon](https://github.com/citizenfx/lua/blob/luaglm-dev/cfx/EXTENDED.md).
|
||||
|
||||
<Callout>
|
||||
Currently zones only have basic support on the server side. Some features will not work such as `onEnter`, `onExit`, and `inside`.
|
||||
Currently zones only have basic support on the server side. Some features will not work such as `onEnter`, `onExit`,
|
||||
and `inside`.
|
||||
</Callout>
|
||||
|
||||
## lib.zones.poly
|
||||
@@ -64,6 +65,8 @@ lib.zones.sphere(data)
|
||||
Zones can be deleted by using the remove method. The data will not be cleared from the script, and can be used to recreate a zone later.
|
||||
|
||||
```lua
|
||||
local zone = lib.zones.box({...})
|
||||
|
||||
zone:remove()
|
||||
|
||||
SetTimeout(500, function()
|
||||
@@ -76,6 +79,8 @@ end)
|
||||
Tests if a point exists inside the zone, returning a `boolean`.
|
||||
|
||||
```lua
|
||||
local zone = lib.zones.box({...})
|
||||
|
||||
if zone:contains(vec3(1, 1, 1)) then
|
||||
print('point is inside zone!')
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user