How is water physics working?

  • EnderiteFox
    17th Jan 2022 Member 1 Permalink

    I am coding a sandbox game in Python, but my water is just flowing too slowly.

    I used these rules:

    1) If there's no element under it, just fall by one pixel

    2) If there's an element under it, fall diagonally, left or right is random (if you can)

    3) If it can't fall, go randomly to the left or right by one pixel

    Can somebody tell me how water is working on tpt so I can improve my script? (I don't want to use pressure, velocity or temperature yet, it would just lag too much)

  • Maticzpl
    17th Jan 2022 Member 1 Permalink

    You probably have to use velocity. Without that it will move just 1px at a time

  • EnderiteFox
    18th Jan 2022 Member 1 Permalink

    I found out that it was doing that only when the water is flowing to the right, because of particle update order, but I don't know how to fix it

    Edited once by Endersteve_gamer. Last: 19th Jan 2022