From 801423fa513bb5deea00536c5777ea56c68f1032 Mon Sep 17 00:00:00 2001 From: lucastucious Date: Mon, 7 Apr 2025 12:32:21 +0200 Subject: [PATCH] Updating defaults values of probe --- Boats/buyancy_probe.gd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Boats/buyancy_probe.gd b/Boats/buyancy_probe.gd index b40bb66..8d6e724 100644 --- a/Boats/buyancy_probe.gd +++ b/Boats/buyancy_probe.gd @@ -4,11 +4,12 @@ extends Marker3D class_name BuyancyProbe ## How much force is applied upward -@export var float_strength: float = 10.0 +@export var float_strength: float = 1.0 @export var max_float_force:float = 500.0 var currentdepth:float @export_category("Debug") +@export var debug :bool = false @export var show_probe :bool = false: set(_value): show_probe = _value @@ -31,8 +32,10 @@ var Oceantime:float @onready var parentRigid:RigidBody3D = get_parent() + # Called when the node enters the scene tree for the first time. func _ready() -> void: + gizmo_extents = 1.0 if ocean_mat != null: update_param() if show_probe: @@ -52,6 +55,8 @@ func _physics_process(_delta: float) -> void: #parentRigid.gravity_scale = 0.3 #parentRigid.angular_damp = 15.0 parentRigid.apply_force(Vector3.UP * clamp(gravity * depth * float_force,-max_float_force,max_float_force) ,global_position-parentRigid.global_position) + if debug: + print(str(self)+" is applying a force of "+str(Vector3.UP * clamp(gravity * depth * float_force,-max_float_force,max_float_force) ,global_position-parentRigid.global_position)+"to "+str(parentRigid)) func _process(_delta: float) -> void: if OceanNode != null: