Hello, I am currently working on a One Piece game and was wondering how I can make an Infinite Ocean. I know that is currently impossible to make a single part “infinite” but I was wondering if I could make it so the part “follows the player”.
Edit: I’m not looking for just making a part’s block mesh a large size, since it lags the game.
Im very not familier with moving stuff but the big idea should be:
- make a big ocean
- make a smaller piece of ocean (still bigger then max render distance) and put it in server storage or something
- when player not on land (because its easier to check that), copy a piece of the smaller ocean and put it under (or over, if the player is supposed to be swimming) the player (remember to anchor it)
- use Cframe to make it follow the player
easier idea is to just make a huge part lol
A single huge Part would have a lot of lag, and this isn’t really helpful. I can’t just use Cframe to follow the player, and my game would also be multiplayer, so putting it in Server Storage wouldn’t really work.
use a specialmesh inside of a part and set the x & z components of the scale property to a large number, since baseparts have a size limit of 2048
I dont think u understood what I meant, since the game will be multiplayer, you CLONE the item from the storage thing (i forgot what it was called and which one you should use), THEN you use Cframe to follow it. I do not exactly udnerstand y u cant use Cframe (cuz im really unfamilier with it), but some other movement methods would also work
I forgot to mention this, but I would prefer not to use this method since it lags the game. Is there another method I can use?
If I use CFrame, then if the player drops in height, the ocean also drops in height. Although I might be able to fix that. If there was 2 players at each other then it would overlap. I am looking for some tutorial or a quick fix to this problem,
I guess it is true that it would overlap, however, you can simply not care about Z axis in Cframe and only care about the X and Y.
another idea would be to “generate” out parts by placing them according to a “grid” like pattern and deleting them if no players are in range
You can clamp the Y axis height by only referring to the X and Z axis of the player.
something along the lines of:
local X = Character.PrimaryPart.CFrame.X --Player X position
local Y = 0
local Z = Character.PrimaryPart.CFrame.Z --Player Y position
Water.CFrame = CFrame.new(X,Y,Z) -Copies the X and Z axis of the player and only the Y axis remains at 0.