I’ve rigged some water and I’m having trouble understanding how to make the water endless. As in when you are swimming in the water you just see nothing but the sea.
Basically the rigged water will have the same height at some spots, you can calculate this. Basically what you then want to do is move the water over to positions like that to continuously teleport the ocean near the player and make it seem endless.
@KJry_s What kind of checks would I need to do for if the player’s near the end of the ocean so I can load more in? How would I detect what position they are at to determine how it would spawn in on the current water?
I think you can make some fog with an Atmosphere
to make that look like its endless?
Create a large terrain, add a water part with adjusted transparency and size, apply a water texture, and use a script to move the water part gradually, creating an infinite looping effect. You can use this script if you’d like x
local waterPart = script.Parent -- Replace "script.Parent" with the actual reference to your water part
while true do
wait(0.1) -- Adjust the delay to control the speed of the scrolling effect
waterPart.Position = waterPart.Position + Vector3.new(0, 0, 1) -- Adjust the Vector3 values to match the desired movement direction
end
I don’t understand, how does this help me with what I’m trying to do?
You can use rigged water to create the illusion that the ocean never ends. What I said gives you a general method for doing so. You can give the appearance of an endless ocean by building a large terrain, adding a water part with modified properties, using a water texture, and putting a script to create an infinite scrolling effect into action. These instructions can be used as a guide to help you set up the required elements and scripting in your game in order to achieve the desired effect, understood?
Yeah but if it’s moving forwards in that direction infinitely then eventually it will start moving away from the player and you’ll be swimming in the air.
Try to implement wrapping or teleportation logic to keep the player within the playable area, so they can continue exploring the endless ocean without encountering empty space or floating in the air x
Okay but for most games that are more open world they don’t keep a player trapped in one area. It’s more like wherever they go the ocean just generates. And idk what you mean by wrapping I’m unsure of what that is.
You can try to implement a procedural generation system where the ocean dynamically generates based on the player’s position, ensuring a continuous and seamless ocean experience without restricting the player’s movement to a specific area though that is a very complex task. x
I recommend attempting creating a custom chunk loading system for when the player goes near, you generate the terrain water and clear surrounding water with air.