Jump to content
  • Advertisement
Sign in to follow this  
bluelobster

"Floating" objects (2d)

This topic is 3051 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I was thinking about trying to move my objects around to make them appear like they are floating on water or some other liquid. Any idea of what approaches I could take? I don't really think I need to do a full buoyancy simulation... Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Add some sinusoidal rotation and elevation changes. Just do a google search for wave motion, look at the images and try to add that movement to those objects.

Basically things move up and down according to a sine curve, and they will rotate back and forth to stay more or less "level" with respect to the tangent of their location on the sine curve.

-me

Share this post


Link to post
Share on other sites
I think that elevation here means that you have to modify / update only the Y coordinate of your object with the sine values.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!