Island

From Crumbled World Wiki

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