diff --git a/addons/godot-jolt/LICENSE.txt b/addons/godot-jolt/LICENSE.txt new file mode 100644 index 0000000..2675022 --- /dev/null +++ b/addons/godot-jolt/LICENSE.txt @@ -0,0 +1,18 @@ +Copyright (c) Mikael Hermansson and Godot Jolt contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/addons/godot-jolt/THIRDPARTY.txt b/addons/godot-jolt/THIRDPARTY.txt new file mode 100644 index 0000000..e294095 --- /dev/null +++ b/addons/godot-jolt/THIRDPARTY.txt @@ -0,0 +1,91 @@ +Godot Jolt incorporates third-party material from the projects listed below. + +Godot Engine (https://github.com/godotengine/godot) + + Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). + Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +godot-cpp (https://github.com/godot-jolt/godot-cpp) + + Copyright (c) 2017-present Godot Engine contributors. + Copyright (c) 2022-present Mikael Hermansson. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +Jolt Physics (https://github.com/godot-jolt/jolt) + + Copyright (c) 2021 Jorrit Rouwe. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +mimalloc (https://github.com/godot-jolt/mimalloc) + + Copyright (c) 2018-2021 Microsoft Corporation, Daan Leijen. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. diff --git a/addons/godot-jolt/android/libgodot-jolt_android-arm32.so b/addons/godot-jolt/android/libgodot-jolt_android-arm32.so new file mode 100644 index 0000000..20ae181 Binary files /dev/null and b/addons/godot-jolt/android/libgodot-jolt_android-arm32.so differ diff --git a/addons/godot-jolt/android/libgodot-jolt_android-arm32_editor.so b/addons/godot-jolt/android/libgodot-jolt_android-arm32_editor.so new file mode 100644 index 0000000..bfe3744 Binary files /dev/null and b/addons/godot-jolt/android/libgodot-jolt_android-arm32_editor.so differ diff --git a/addons/godot-jolt/android/libgodot-jolt_android-arm64.so b/addons/godot-jolt/android/libgodot-jolt_android-arm64.so new file mode 100644 index 0000000..a089ce6 Binary files /dev/null and b/addons/godot-jolt/android/libgodot-jolt_android-arm64.so differ diff --git a/addons/godot-jolt/android/libgodot-jolt_android-arm64_editor.so b/addons/godot-jolt/android/libgodot-jolt_android-arm64_editor.so new file mode 100644 index 0000000..95af658 Binary files /dev/null and b/addons/godot-jolt/android/libgodot-jolt_android-arm64_editor.so differ diff --git a/addons/godot-jolt/android/libgodot-jolt_android-x64.so b/addons/godot-jolt/android/libgodot-jolt_android-x64.so new file mode 100644 index 0000000..f764940 Binary files /dev/null and b/addons/godot-jolt/android/libgodot-jolt_android-x64.so differ diff --git a/addons/godot-jolt/android/libgodot-jolt_android-x64_editor.so b/addons/godot-jolt/android/libgodot-jolt_android-x64_editor.so new file mode 100644 index 0000000..43f9d2b Binary files /dev/null and b/addons/godot-jolt/android/libgodot-jolt_android-x64_editor.so differ diff --git a/addons/godot-jolt/android/libgodot-jolt_android-x86.so b/addons/godot-jolt/android/libgodot-jolt_android-x86.so new file mode 100644 index 0000000..e8d6cad Binary files /dev/null and b/addons/godot-jolt/android/libgodot-jolt_android-x86.so differ diff --git a/addons/godot-jolt/android/libgodot-jolt_android-x86_editor.so b/addons/godot-jolt/android/libgodot-jolt_android-x86_editor.so new file mode 100644 index 0000000..5583ff2 Binary files /dev/null and b/addons/godot-jolt/android/libgodot-jolt_android-x86_editor.so differ diff --git a/addons/godot-jolt/godot-jolt.gdextension b/addons/godot-jolt/godot-jolt.gdextension new file mode 100644 index 0000000..8a7e50b --- /dev/null +++ b/addons/godot-jolt/godot-jolt.gdextension @@ -0,0 +1,41 @@ +[godot-jolt] +version = "0.14.0-stable" +build = "3392156fab" + +[configuration] + +entry_symbol = "godot_jolt_main" +compatibility_minimum = "4.3" +compatibility_maximum = "4.3" + +[libraries] + +windows.release.single.x86_64 = "windows/godot-jolt_windows-x64.dll" +windows.debug.single.x86_64 = "windows/godot-jolt_windows-x64_editor.dll" + +windows.release.single.x86_32 = "windows/godot-jolt_windows-x86.dll" +windows.debug.single.x86_32 = "windows/godot-jolt_windows-x86_editor.dll" + +linux.release.single.x86_64 = "linux/godot-jolt_linux-x64.so" +linux.debug.single.x86_64 = "linux/godot-jolt_linux-x64_editor.so" + +linux.release.single.x86_32 = "linux/godot-jolt_linux-x86.so" +linux.debug.single.x86_32 = "linux/godot-jolt_linux-x86_editor.so" + +macos.release.single = "macos/godot-jolt_macos.framework" +macos.debug.single = "macos/godot-jolt_macos_editor.framework" + +ios.release.single = "ios/godot-jolt_ios.framework" +ios.debug.single = "ios/godot-jolt_ios_editor.framework" + +android.release.single.arm64 = "android/libgodot-jolt_android-arm64.so" +android.debug.single.arm64 = "android/libgodot-jolt_android-arm64_editor.so" + +android.release.single.arm32 = "android/libgodot-jolt_android-arm32.so" +android.debug.single.arm32 = "android/libgodot-jolt_android-arm32_editor.so" + +android.release.single.x86_64 = "android/libgodot-jolt_android-x64.so" +android.debug.single.x86_64 = "android/libgodot-jolt_android-x64_editor.so" + +android.release.single.x86_32 = "android/libgodot-jolt_android-x86.so" +android.debug.single.x86_32 = "android/libgodot-jolt_android-x86_editor.so" diff --git a/addons/godot-jolt/ios/godot-jolt_ios.framework/Info.plist b/addons/godot-jolt/ios/godot-jolt_ios.framework/Info.plist new file mode 100644 index 0000000..ae5f211 --- /dev/null +++ b/addons/godot-jolt/ios/godot-jolt_ios.framework/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleDevelopmentRegion + en + CFBundleExecutable + godot-jolt_ios + CFBundleName + Godot Jolt + CFBundleDisplayName + Godot Jolt + CFBundleIdentifier + org.godot-jolt.godot-jolt + NSHumanReadableCopyright + Copyright (c) Mikael Hermansson and Godot Jolt contributors. + CFBundleVersion + 0.14.0 + CFBundleShortVersionString + 0.14.0 + CFBundlePackageType + FMWK + CFBundleSupportedPlatforms + + iPhoneOS + + CSResourcesFileMapped + + DTPlatformName + iphoneos + MinimumOSVersion + 12.0 + + + AvailableLibraries + + + BinaryPath + godot-jolt_ios.dylib + + + + diff --git a/addons/godot-jolt/ios/godot-jolt_ios.framework/godot-jolt_ios b/addons/godot-jolt/ios/godot-jolt_ios.framework/godot-jolt_ios new file mode 100644 index 0000000..39d38b8 Binary files /dev/null and b/addons/godot-jolt/ios/godot-jolt_ios.framework/godot-jolt_ios differ diff --git a/addons/godot-jolt/ios/godot-jolt_ios_editor.framework/Info.plist b/addons/godot-jolt/ios/godot-jolt_ios_editor.framework/Info.plist new file mode 100644 index 0000000..44285c4 --- /dev/null +++ b/addons/godot-jolt/ios/godot-jolt_ios_editor.framework/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleDevelopmentRegion + en + CFBundleExecutable + godot-jolt_ios_editor + CFBundleName + Godot Jolt + CFBundleDisplayName + Godot Jolt + CFBundleIdentifier + org.godot-jolt.godot-jolt + NSHumanReadableCopyright + Copyright (c) Mikael Hermansson and Godot Jolt contributors. + CFBundleVersion + 0.14.0 + CFBundleShortVersionString + 0.14.0 + CFBundlePackageType + FMWK + CFBundleSupportedPlatforms + + iPhoneOS + + CSResourcesFileMapped + + DTPlatformName + iphoneos + MinimumOSVersion + 12.0 + + + AvailableLibraries + + + BinaryPath + godot-jolt_ios_editor.dylib + + + + diff --git a/addons/godot-jolt/ios/godot-jolt_ios_editor.framework/godot-jolt_ios_editor b/addons/godot-jolt/ios/godot-jolt_ios_editor.framework/godot-jolt_ios_editor new file mode 100644 index 0000000..33e172d Binary files /dev/null and b/addons/godot-jolt/ios/godot-jolt_ios_editor.framework/godot-jolt_ios_editor differ diff --git a/addons/godot-jolt/linux/godot-jolt_linux-x64.so b/addons/godot-jolt/linux/godot-jolt_linux-x64.so new file mode 100644 index 0000000..844f4a6 Binary files /dev/null and b/addons/godot-jolt/linux/godot-jolt_linux-x64.so differ diff --git a/addons/godot-jolt/linux/godot-jolt_linux-x64_editor.so b/addons/godot-jolt/linux/godot-jolt_linux-x64_editor.so new file mode 100644 index 0000000..ee33458 Binary files /dev/null and b/addons/godot-jolt/linux/godot-jolt_linux-x64_editor.so differ diff --git a/addons/godot-jolt/linux/godot-jolt_linux-x86.so b/addons/godot-jolt/linux/godot-jolt_linux-x86.so new file mode 100644 index 0000000..7271775 Binary files /dev/null and b/addons/godot-jolt/linux/godot-jolt_linux-x86.so differ diff --git a/addons/godot-jolt/linux/godot-jolt_linux-x86_editor.so b/addons/godot-jolt/linux/godot-jolt_linux-x86_editor.so new file mode 100644 index 0000000..18df932 Binary files /dev/null and b/addons/godot-jolt/linux/godot-jolt_linux-x86_editor.so differ diff --git a/addons/godot-jolt/macos/godot-jolt_macos.framework/Resources/Info.plist b/addons/godot-jolt/macos/godot-jolt_macos.framework/Resources/Info.plist new file mode 100644 index 0000000..a17a9b8 --- /dev/null +++ b/addons/godot-jolt/macos/godot-jolt_macos.framework/Resources/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleDevelopmentRegion + en + CFBundleExecutable + godot-jolt_macos + CFBundleName + Godot Jolt + CFBundleDisplayName + Godot Jolt + CFBundleIdentifier + org.godot-jolt.godot-jolt + NSHumanReadableCopyright + Copyright (c) Mikael Hermansson and Godot Jolt contributors. + CFBundleVersion + 0.14.0 + CFBundleShortVersionString + 0.14.0 + CFBundlePackageType + FMWK + CFBundleSupportedPlatforms + + MacOSX + + CSResourcesFileMapped + + DTPlatformName + macosx + LSMinimumSystemVersion + 10.12 + + diff --git a/addons/godot-jolt/macos/godot-jolt_macos.framework/_CodeSignature/CodeResources b/addons/godot-jolt/macos/godot-jolt_macos.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..bfa44d7 --- /dev/null +++ b/addons/godot-jolt/macos/godot-jolt_macos.framework/_CodeSignature/CodeResources @@ -0,0 +1,128 @@ + + + + + files + + Resources/Info.plist + + et0C7sxAlu4eIDcq2ihFQ2BhDSk= + + + files2 + + Resources/Info.plist + + hash2 + + ZnG0hD4DciikOVWrf1Ai1Qedz9hESuIFvUujZAebHRY= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/addons/godot-jolt/macos/godot-jolt_macos.framework/godot-jolt_macos b/addons/godot-jolt/macos/godot-jolt_macos.framework/godot-jolt_macos new file mode 100644 index 0000000..8e08a86 Binary files /dev/null and b/addons/godot-jolt/macos/godot-jolt_macos.framework/godot-jolt_macos differ diff --git a/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/Resources/Info.plist b/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/Resources/Info.plist new file mode 100644 index 0000000..1a54a40 --- /dev/null +++ b/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/Resources/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleDevelopmentRegion + en + CFBundleExecutable + godot-jolt_macos_editor + CFBundleName + Godot Jolt + CFBundleDisplayName + Godot Jolt + CFBundleIdentifier + org.godot-jolt.godot-jolt + NSHumanReadableCopyright + Copyright (c) Mikael Hermansson and Godot Jolt contributors. + CFBundleVersion + 0.14.0 + CFBundleShortVersionString + 0.14.0 + CFBundlePackageType + FMWK + CFBundleSupportedPlatforms + + MacOSX + + CSResourcesFileMapped + + DTPlatformName + macosx + LSMinimumSystemVersion + 10.12 + + diff --git a/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/_CodeSignature/CodeResources b/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..f7016fd --- /dev/null +++ b/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/_CodeSignature/CodeResources @@ -0,0 +1,128 @@ + + + + + files + + Resources/Info.plist + + oIAzxlQz4Hun6JnLVOu9jafYxGE= + + + files2 + + Resources/Info.plist + + hash2 + + FA6I/u5+Ww0DzXAvawYXs792eum+8Bim8uHBbg98jqY= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/godot-jolt_macos_editor b/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/godot-jolt_macos_editor new file mode 100644 index 0000000..6724cef Binary files /dev/null and b/addons/godot-jolt/macos/godot-jolt_macos_editor.framework/godot-jolt_macos_editor differ diff --git a/addons/godot-jolt/windows/godot-jolt_windows-x64.dll b/addons/godot-jolt/windows/godot-jolt_windows-x64.dll new file mode 100644 index 0000000..a427abe Binary files /dev/null and b/addons/godot-jolt/windows/godot-jolt_windows-x64.dll differ diff --git a/addons/godot-jolt/windows/godot-jolt_windows-x64_editor.dll b/addons/godot-jolt/windows/godot-jolt_windows-x64_editor.dll new file mode 100644 index 0000000..c05d288 Binary files /dev/null and b/addons/godot-jolt/windows/godot-jolt_windows-x64_editor.dll differ diff --git a/addons/godot-jolt/windows/godot-jolt_windows-x86.dll b/addons/godot-jolt/windows/godot-jolt_windows-x86.dll new file mode 100644 index 0000000..bdfe732 Binary files /dev/null and b/addons/godot-jolt/windows/godot-jolt_windows-x86.dll differ diff --git a/addons/godot-jolt/windows/godot-jolt_windows-x86_editor.dll b/addons/godot-jolt/windows/godot-jolt_windows-x86_editor.dll new file mode 100644 index 0000000..1a54df4 Binary files /dev/null and b/addons/godot-jolt/windows/godot-jolt_windows-x86_editor.dll differ diff --git a/project.godot b/project.godot index 101c1a4..18dd3e6 100644 --- a/project.godot +++ b/project.godot @@ -150,8 +150,9 @@ select_putter={ [physics] -3d/default_angular_damp=2.0 +3d/physics_engine="JoltPhysics3D" 3d/sleep_threshold_angular=0.3 +jolt_3d/limits/max_temporary_memory=64 [rendering] diff --git a/src/player/physics_ball/game_ball.gd b/src/player/physics_ball/game_ball.gd index 61cb49f..e5e6f52 100644 --- a/src/player/physics_ball/game_ball.gd +++ b/src/player/physics_ball/game_ball.gd @@ -2,3 +2,15 @@ class_name GameBall extends RigidBody3D ## Base class for all gfolf balls signal entered_water + +## Angular damping while in air +@export var air_damping := 0.0 +## Angular damping while in collision with rough terrain +@export var rough_damping := 8.0 + + +func _integrate_forces(state: PhysicsDirectBodyState3D) -> void: + if state.get_contact_count(): + angular_damp = rough_damping + else: + angular_damp = air_damping diff --git a/src/player/physics_ball/physics_ball.tscn b/src/player/physics_ball/physics_ball.tscn index a7beb42..183a800 100644 --- a/src/player/physics_ball/physics_ball.tscn +++ b/src/player/physics_ball/physics_ball.tscn @@ -5,7 +5,7 @@ [ext_resource type="Texture2D" uid="uid://btntjs7mbdigu" path="res://assets/textures/gfolfball/gfolfball_normal.png" id="2_mx7l6"] [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_2gatw"] -friction = 0.2 +friction = 0.8 bounce = 0.5 [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xqofq"] @@ -34,7 +34,10 @@ radius = 0.05 mass = 0.05 physics_material_override = SubResource("PhysicsMaterial_2gatw") continuous_cd = true +contact_monitor = true +max_contacts_reported = 1 linear_damp_mode = 1 +angular_damp_mode = 1 script = ExtResource("1_iwh2u") [node name="BallMesh" type="MeshInstance3D" parent="."] diff --git a/src/player/shot_setup/shot_setup.gd b/src/player/shot_setup/shot_setup.gd index 8d2c180..1c3ed22 100644 --- a/src/player/shot_setup/shot_setup.gd +++ b/src/player/shot_setup/shot_setup.gd @@ -214,7 +214,7 @@ func insert_free_cam() -> void: func return_free_cam() -> void: # TODO alter shot aim based on free camera selection arrow_animation.play("show") - shot_projection.hide() + #shot_projection.hide() hud_state.travel("visible") _free_camera.queue_free() _free_camera = null diff --git a/src/shaders/hologram.gdshader b/src/shaders/hologram.gdshader index 99e709c..e66a446 100644 --- a/src/shaders/hologram.gdshader +++ b/src/shaders/hologram.gdshader @@ -34,14 +34,14 @@ void fragment () { } vec2 lines = vec2(clamp(sin((TIME * line_speed + canvas.y) / line_width), line_blur, 1.0 - line_blur), canvas.x); vec2 interupts = vec2(clamp(sin((TIME * interrupt_speed + canvas.y) / interrupt_width * 3.0), interrupt_blur, 1.0 - interrupt_blur), canvas.x); - + float flicker = clamp(fract(cos(TIME) * 43758.5453123), flickering, 1.0); vec4 imgtex = flicker * line_color * texture(texture_image, lines * interupts); vec3 imgtex_color = vec3(imgtex.r, imgtex.g, imgtex.b); vec3 fresnel_color = vec3(glow_color.r, glow_color.g, glow_color.b); vec3 fresnel = fresnel_glow(glow_amount, glow_itensity, fresnel_color, NORMAL, VIEW); ALBEDO = imgtex_color + fresnel; - + EMISSION = glow_amount * vec3(glow_color.r, glow_color.g, glow_color.b); ALPHA = lines.x * interupts.x; } \ No newline at end of file diff --git a/src/ui/projected_target.tscn b/src/ui/projected_target.tscn index 55be44c..c9ffaf7 100644 --- a/src/ui/projected_target.tscn +++ b/src/ui/projected_target.tscn @@ -29,6 +29,21 @@ material = SubResource("ShaderMaterial_msl6u") radial_segments = 16 rings = 16 +[sub_resource type="Animation" id="Animation_yu68k"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 0, 0)] +} + [sub_resource type="Animation" id="Animation_npp1f"] resource_name = "rotate" length = 3.236 @@ -46,21 +61,6 @@ tracks/0/keys = { "values": [Vector3(0, 0, 0), Vector3(0, -3.14159, 0)] } -[sub_resource type="Animation" id="Animation_yu68k"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:rotation") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector3(0, 0, 0)] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_vm52d"] _data = { "RESET": SubResource("Animation_yu68k"), @@ -68,7 +68,6 @@ _data = { } [node name="ProjectedTarget" type="MeshInstance3D"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) mesh = SubResource("SphereMesh_dbo5p") [node name="Pivot" type="Node3D" parent="."]