Island: Difference between revisions
From Crumbled World Wiki
(Created page with "{{:IslandExampleCode}} ==Inheritance== SceneNode ==Functions== {| class="wikitable" !|return !|function !|description |- |Vec2 |convertFromIslandLocalSpaceToNavMeshSpace(Vec3 localIslandPosition) |Returns a local position for the navmesh. |- |int |getIslandId() |Get unique island id. |- |float |Island:getDistanceToIsland(Vec3 position)|getDistanceToIsla...") |
|||
| Line 25: | Line 25: | ||
|[[Island:getVelocity()|getVelocity]]() | |[[Island:getVelocity()|getVelocity]]() | ||
|Get the islands velocity. | |Get the islands velocity. | ||
|- | |||
|[[Box]] | |||
|[[Island:getBoundingBox()|getBoundingBox]]() | |||
|Get the islands global BoundingBox. | |||
|- | |- | ||
|[[Texture]] | |[[Texture]] | ||
| Line 41: | Line 45: | ||
|[[Island:setNextLocalMatrix(Matrix localMatrix)|setNextLocalMatrix]]([[Matrix]] localMatrix) | |[[Island:setNextLocalMatrix(Matrix localMatrix)|setNextLocalMatrix]]([[Matrix]] localMatrix) | ||
|Set the island local matrix for the next frame. | |Set the island local matrix for the next frame. | ||
|- | |||
| | |||
|[[Island:setBoundingSphere(Sphere boundingSphere)|setBoundingSphere]]([[Sphere]] boundingSphere) | |||
| | |||
|- | |||
| | |||
|[[Island:setBoundingBox(Box boundingBox)|setBoundingBox]]([[Box]] boundingBox) | |||
| | |||
|- | |||
| | |||
|[[Island:lockDownIslandMovment()|lockDownIslandMovment]]() | |||
|Stop the island from moving by itselef | |||
|- | |||
| | |||
|[[Island:unLockIslandMovment()|unLockIslandMovment]]() | |||
|Allow the island from moving by itselef | |||
|- | |- | ||
| | | | ||
Latest revision as of 08:53, 4 August 2025
Inheritance
Functions
| return | function | description |
|---|---|---|
| Vec2 | convertFromIslandLocalSpaceToNavMeshSpace(Vec3 localIslandPosition) | Returns a local position for the navmesh. |
| int | getIslandId() | Get unique island id. |
| float | getDistanceToIsland(Vec3 position) | Get distance between this island and the given position. |
| Vec3 | getVelocity() | Get the islands velocity. |
| Box | getBoundingBox() | Get the islands global BoundingBox. |
| Texture | getIslandTexture(int index) | Get island texture. index is between [1,3]. |
| int | getPlayerId() | Get island player id. Player is between [0,n] 0 represent that island belong to no player player id larger then 0 represent a player id. |
| setNextLocalPosition(Vec3 position) | Set the island position for the next frame. | |
| setNextLocalMatrix(Matrix localMatrix) | Set the island local matrix for the next frame. | |
| setBoundingSphere(Sphere boundingSphere) | ||
| setBoundingBox(Box boundingBox) | ||
| lockDownIslandMovment() | Stop the island from moving by itselef | |
| unLockIslandMovment() | Allow the island from moving by itselef | |
| setPlayerId(int playerId) | Set island player id. Player id should be between [0,n] | |
| setPaintBrushTexture(Texture texture) | Set paint brush texture. | |
| setPaintBrushTexture(string texture) | Set paint brush texture by name. | |
| setPaintBrushColor(Vec3 color) | ||
| paint(Vec3 globalPos, float brushSize, float brushStrength) | ||
| setIslandTexture(int index, Texture texture) | Set island texture. index is between [1,3]. |