Sampling Terrain Water Height at Any Position

Yeah, strange :eyes:
Last question - how’d you do that neat visualizer in that video you sent over? (of the axis)

1 Like

I’ve got a visualizer module I use for this kind of stuff. Visualizers.rbxm (3.4 KB)

2 Likes

Wow, thanks!
Amazing work, appreciate it.

2 Likes

This is game changing! Can’t wait to see what comes in the nearby future. I’m quite surprised this system wasn’t in the game engine to begin with.

4 Likes

I have some quick commission work regarding this. Are you available & do you have a Discord?

1 Like

Thank you so much, this is amazing. I’ve been waiting for so long for somebody to create this, great job!

2 Likes

I remember when seeing this in action first hand - absolutely amazing!
OP’s code helped me A LOT to set the buoyancy of bobbers to properly work using the wave’s heights based on their positions in the world. Here’s a really small gif of it in action in my place using it.

https://gyazo.com/2daccd995793552c663edb4b888c4404

I had a problem with syncing things perfectly at some point though, and as I’ve discussed with OP, setting the timer to update on .RenderStepped or .Heartbeat, instead of .Stepped, seems to have solved the issue I was having. For context, the wave settings are all done client side, which differs from OP’s approach, because if I recall correctly, he does it on the server for this project.

It’s nice actually finding out that you shared this with the whole community @robro786!
Awesome guy :smile:

4 Likes

yeah, here’s my discord: Chicken#7025

Maybe you could try google drive or github?

2 Likes

@robro786 Is there a chance that you can explain the “pitch” part to me? Im having some hard times with the guide.

Were you able to get roll working? Pitch is the same thing NG, just on a different axis.

Do you think there would be a way to make this work on a moving boat?

Yes. All orientation code would remain pretty much the same. Might just have to utilize a bodymover instead of directly setting primary part cframe.

1 Like

could you show us the getBoatOrientation() function? m trying to do this right now

https://streamable.com/4ac1fg
Alr so I just used a bodymover (BodyPosition) inside the primary part of my boat (its the hull itself) and its producing weird results. Do I have to do anything else? I tried using a bodygyro and setting its CFrame but that did not work either. What else should I do? @robro786

Oh nvm, I figured it out. Goes good, and the boat is drivable! Thanks! I found another way for orientation though, might tell it later

1 Like

Could you show the solution? I could really use it.

Just use the solution robro provided above. I used my own calculations at first but then I ended up using his, because mine desync after some time.

can I ask what the function getBoatOrientation is?

Can you provide a .rbxl file with the boat you made? The minimal information you provided is pretty vague, it doesn’t say if any of these should be anchored or not, if there are any welds, also you didn’t say which specific parts are the bow, stern and such, it would just be a lot less trouble to follow this if you provided at least some better example or a download for the boat, as people tried to respond to you and you didn’t answer back later on their questions.