Water
Function | Description |
---|---|
Water.new() | Creates a blank water object |
Water.new(Vector2D tileSize , Vector2D tileCount , Vector2D textureRepeat ) |
Creates water with grid dimensions and texture scaling |
Water.new(Material material ) |
Creates water using the given material |
Water.new(table t ) |
Creates water from a table of values: { height = float, speed = float, length = float, tileSize = Vector2D, tileCount = Vector2D, textureRepeat = Vector2D, material = Material } |
Property | Type | Description |
---|---|---|
.position | Vector3D | Water position |
.rotation | Vector3D | Water rotation |
.scale | Vector3D | Water scale |
.visible | bool | Whether water is visible |
.height | float | Height of waves |
.speed | float | Speed of waves |
.length | float | Length of waves |
.shadows | int | Enable shadows (legacy only); see SHADOW_MODE |
Function | Returns | Description |
---|---|---|
:destroy() | Destroys the water object | |
:loadMaterial(Material material ) |
Loads the given material | |
:ignoreLighting() | Disables lighting for this object | |
:setParent(3DObject other ) |
Parents this water object to another 3D object | |
:getAbsolutePosition() | Vector3D | Returns world-space position |
:getAbsoluteRotation() | Vector3D | Returns world-space rotation |
:getAbsoluteScale() | Vector3D | Returns world-space scale |
:updateAbsolutePosition() | Updates world transform (non-recursive) |