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...")
(No difference)

Revision as of 12:59, 5 July 2025

IslandExampleCode

Inheritance

SceneNode

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.
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.
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].