Refactor fishing surfaces around authored water

This commit is contained in:
Alexander Sellite 2026-08-15 09:52:50 -04:00
parent 9f52620a73
commit 9afa60f6a5
11 changed files with 198 additions and 172 deletions

View file

@ -1,9 +1,6 @@
class_name RemoteFishingPresentation
extends Node3D
const WaterSurfaceMotionType = preload(
"res://world/water_surface_motion.gd"
)
const LINE_THICKNESS: float = 0.016
signal return_completed
@ -157,10 +154,6 @@ func _set_cast_sample(
) -> void:
_target = start.lerp(target, progress)
_target.y += sin(progress * PI) * 2.0
_target.y += (
WaterSurfaceMotionType.get_default_height_offset()
* smoothstep(0.72, 1.0, progress)
)
_bobber.global_position = _target
@ -175,10 +168,7 @@ func _on_cast_finished() -> void:
func _apply_bobber_idle_motion() -> void:
var phase: float = _bobber_idle_elapsed * 0.7 * TAU
_target = _pending_target + Vector3.UP * (
WaterSurfaceMotionType.get_default_height_offset()
+ sin(phase) * 0.035
)
_target = _pending_target + Vector3.UP * sin(phase) * 0.035
_bobber.global_position = _target
_bobber.rotation.z = deg_to_rad(4.0) * sin(phase * 0.73)