kept random vector function in but it's not being used

This commit is contained in:
AmyLillya 2023-09-04 19:30:31 -03:00
parent a904d18eb1
commit b727d46c5e
4 changed files with 8 additions and 11 deletions

View File

@ -6,5 +6,6 @@ extends Node
const LOOK_AT_OFFSET_FIX = Vector3(0.01, 1, 0.01)
func uniform_vector3(value : float):
# Compose an uniform Vector3 from a float value
func uniform_vec3(value : float):
return Vector3(value, value, value)

View File

@ -20,7 +20,6 @@ func _physics_process(delta):
_get_collision(delta)
### DEBUG
# Delete balls that escape the level
if global_position.length() > 20.0:
@ -78,6 +77,7 @@ func _after_collision():
freeze = false
linear_velocity = bounced_velocity
### DEBUG
freeze = true
# freeze = true
# queue_free()

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=3 uid="uid://rdlvlyf0l1l"]
[gd_scene load_steps=7 format=3 uid="uid://rdlvlyf0l1l"]
[ext_resource type="Script" path="res://Ball/ball.gd" id="1_oenn5"]
[ext_resource type="PackedScene" uid="uid://lge7m41oi6pn" path="res://Ball/Meshes/ball_bouncing.glb" id="2_ccq7m"]
@ -9,9 +9,6 @@
[sub_resource type="SphereShape3D" id="SphereShape3D_ogc07"]
radius = 0.3
[sub_resource type="BoxMesh" id="BoxMesh_yno20"]
size = Vector3(0.2, 0.2, 0.2)
[node name="Ball" type="RigidBody3D" groups=["Balls"]]
collision_layer = 4
custom_integrator = true
@ -45,7 +42,3 @@ script = ExtResource("5_j25qm")
[node name="VectorPosition" type="Node3D" parent="RandomVectorNode"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1)
[node name="debugmesh" type="MeshInstance3D" parent="RandomVectorNode/VectorPosition"]
mesh = SubResource("BoxMesh_yno20")
skeleton = NodePath("../../..")

View File

@ -2,6 +2,8 @@ extends Node3D
@onready var ball = owner
var random_offset : Vector3
func _ready():
ball.ball_collision_started.connect(_get_random_offset)
@ -18,3 +20,4 @@ func _get_random_offset():
var random_vector = Vector3(x, y, z)
$VectorPosition.position += random_vector
random_offset = $VectorPosition.position