1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 12:46:02 +02:00

boats: Improve physics by implementing drag and friction forces

Implement drag force according to the equation:
drag_force = drag_coefficient * speed ^2
Also add a small constant force to implement friction force.
This commit is contained in:
Bartosz
2019-10-24 04:47:28 +02:00
committed by Paramat
parent f9a9e87af6
commit dd71dcbcf6
2 changed files with 13 additions and 21 deletions

View File

@ -12,7 +12,9 @@ read_globals = {
"Settings",
"unpack",
-- Silence errors about custom table methods.
table = { fields = { "copy", "indexof" } }
table = { fields = { "copy", "indexof" } },
-- Silence warnings about accessing undefined fields of global 'math'
math = { fields = { "sign" } }
}
-- Overwrites minetest.handle_node_drops