- What do you want to achieve? Keep it simple and clear!
i want to make it so that the terrain water rises every second
like this video:
i want to make it so that the terrain water rises every second
like this video:
I haven’t really used roblox terrain water for a long time before but from memory I think there is a property related to sizing that can be accessed via script and if you tween it on the Y axis it should smoothly move up.
One small issue that you may face with Terrain water is that, it will look jittery if tweened or animated, since it only does it in I believe one stud increments in a 4 by 4 by 4 grid.
This is true, you might be better off moving everything else down
local Terrain = game.workspace.Terrain
local region = Region3.new(Vector3.new(10, 0, 10), Vector3.new(20, 1, 20))
local resolution = 1
local material = Enum.Material.Water
Terrain:FillRegion(region, resolution, material)
local heightTerrain = 1
while true do
task.wait(1)
region = Region3.new(Vector3.new(10, 0, 10), Vector3.new(20, heightTerrain, 20))
Terrain:FillRegion(region, resolution, material)
heightTerrain += 1
end
I dont know if is possible to move less than one stud.
hm ill try that out, and ill also try moving the map down.
just use a script maybe to constantly add and re-add the water in diffirent positions? I dont know the code for it but you can maybe search it up.
I don’t recommend you move the map down as the player starts randomly jumping and the physics act weird.
yeah that is my concern about that
hm i try it but it isnt smooth, is there another way to make it smooth?
Smooth no. But can be better. If you create a part and add this inside:
game.Workspace.Terrain:FillBlock(script.Parent.CFrame, script.Parent.Size, Enum.Material.Water)
myPart = script.Parent
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut) -- Tweening parameters
local heightTerrain = 1
while true do
task.wait(0.1)
local targetSize = myPart.Size + Vector3.new(0, 1, 0)
local tween = TweenService:Create(myPart, tweenInfo, {Size = targetSize})
tween:Play()
region = Region3.new(Vector3.new(10, 0, 10), Vector3.new(20, heightTerrain, 20))
game.Workspace.Terrain:FillBlock(script.Parent.CFrame, script.Parent.Size, Enum.Material.Water)
end
But every time the water level fill a stud it will glitch. You can also try to create a localscript and bind the Render to fill the part with water:
local RunService = game:GetService("RunService")
local myPart = workspace.WaterBlock
RunService.RenderStepped:Connect(function(deltaTime)
game.Workspace.Terrain:FillBlock(myPart.CFrame, myPart.Size, Enum.Material.Water)
end)
Then use a script inside a Part to tween the size up every second:
game.Workspace.Terrain:FillBlock(script.Parent.CFrame, script.Parent.Size, Enum.Material.Water)
myPart = script.Parent
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut) -- Tweening parameters
local heightTerrain = 1
while true do
task.wait(1)
local targetSize = myPart.Size + Vector3.new(0, 1, 0)
local tween = TweenService:Create(myPart, tweenInfo, {Size = targetSize})
tween:Play()
region = Region3.new(Vector3.new(10, 0, 10), Vector3.new(20, heightTerrain, 20))
--game.Workspace.Terrain:FillBlock(script.Parent.CFrame, script.Parent.Size, Enum.Material.Water)
end
But will glitch every stud filled.
i mean yeah its good even though a bit glitch, but how do i achieve it like in the apeirophobia video do they use terrain water or no?
I do not know if they used terrain or some custom mesh. Sorry.
In the video, they most likely used a deformation mesh, and then raised the nodes on the deformation mesh, wherever the water where floating the most (filling up the fastest), and scripted so it all were planned out in a smooth transition
yeah and for the wave do they use perlin noise?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.