2D Water Physics?

ZingZing Posts: 45Member

I need water my Rigidbody2D character would navigate in, any ideas of how?

Tags :


  • TwistedTwiglegTwistedTwigleg Posts: 3,076Admin

    I've always just used a Area2D that has a body_entered and body_exited signal that tells the entity that it is underwater. Then I use a few conditions that check if the entity is underwater, and if it is, I make gravity less, apply movement dampening, and other minor changes that make it act like its underwater.
    It is a tad harder to maintain though, especially depending on the complexity of the code. There are probably better ways to do it.

  • ZingZing Posts: 45Member

    That is what I thought would work, but as you said, over time it can become messy. I'll let you know if I use an alternative solution.

Sign In or Register to comment.