diff --git a/Scenes/Column.tscn b/Scenes/Column.tscn index dd6972a..d0b6919 100644 --- a/Scenes/Column.tscn +++ b/Scenes/Column.tscn @@ -63,7 +63,7 @@ layers = 1 params/enabled = true params/editor_only = false params/bake_mode = 1 -params/energy = 0.65 +params/energy = 0.5 colors/diffuse = Color( 1, 1, 1, 1 ) colors/specular = Color( 1, 1, 1, 1 ) shadow/shadow = false @@ -81,7 +81,6 @@ shadow/zoffset_scale = 2.0 [node name="Spatial" parent="." instance=ExtResource( 6 )] -transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.83688, 17.7, 2.56991 ) -visibility/visible = false +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.83688, 17.4298, 2.56991 ) diff --git a/Scenes/Player.gd b/Scenes/Player.gd index cb3ea95..3c3f313 100644 --- a/Scenes/Player.gd +++ b/Scenes/Player.gd @@ -13,6 +13,7 @@ onready var ball = get_node ("RigidBody/Axis/Group/Ball") onready var area = get_node ("RigidBody/Axis/Group/Area") onready var rigid_2 = get_node("RigidBody2") onready var light = get_node("RigidBody/Axis/Group/OmniLight") +onready var decal_raycast = get_node("RigidBody/Axis/DecalRayCast") onready var camera_axis = get_node ("RigidBody2/CameraAxis") @@ -78,9 +79,17 @@ func die(): area.queue_free() get_node("Timer").start() - + +func block_camera(): + rigid_2.set_sleeping(true) + +func release_camera(): + rigid_2.set_sleeping(false) func on_platform_passed(): + release_camera() + rigid_2.set_linear_velocity(rigid.get_linear_velocity()) + unlimit_rotation_range() global.update_points((counter + 1) * 10) global.update_progress() @@ -96,9 +105,7 @@ func on_platform_passed(): if (meteor_charged): meteor_particles.set_emitting(true) meteorize() - - rigid_2.set_sleeping(false) - rigid_2.set_linear_velocity(rigid.get_linear_velocity()) + func lock_rot(): last_safe_rotation = axis.get_rotation_deg() @@ -152,7 +159,7 @@ func end_animation(): die_particles.set_emitting(true) -func _on_Area_body_enter(body): +func _on_Area_body_enter(body): rigid.set_linear_velocity(Vector3(0,0,0)) light.set_enabled(false) @@ -164,9 +171,9 @@ func _on_Area_body_enter(body): if (!meteor_charged): meteor_charged = true - if (body.is_in_group ("bad") && !meteor): - print ("SD") + if (!meteor && decal_raycast.is_colliding() and decal_raycast.get_collider().is_in_group("bad")): die() + else: if (meteor): unlimit_rotation_range() @@ -175,13 +182,15 @@ func _on_Area_body_enter(body): body.get_parent().get_parent().get_parent().get_parent().meteorize() meteor_charged = false big_splash.set_emitting(true) - rigid_2.apply_impulse(Vector3(0,0,0), Vector3(0,100,0)) + rigid_2.apply_impulse(Vector3(0,0,0), Vector3(0,120,0)) + release_camera() + rigid_2.apply_impulse(Vector3(0,0,0), Vector3(0,120,0)) else: jump_sound.play(0) var aux = decal.instance() body.get_parent().add_child(aux) var tr = aux.get_global_transform() - tr.origin = get_node("RigidBody/Axis/DecalRayCast").get_collision_point() + tr.origin = decal_raycast.get_collision_point() aux.set_global_transform(tr) aux.rotate_y(rand_range(0, 360)) aux.translate(Vector3(0,0.0001,0)) @@ -214,3 +223,6 @@ func _on_Timer_timeout(): func _on_Area_body_exit( body ): colliding = false +func _on_Area_area_enter( area ): + if (area.is_in_group("deleter") and !meteor): + block_camera() diff --git a/Scenes/Player.tscn b/Scenes/Player.tscn index c6ac1bf..e38bdb3 100644 --- a/Scenes/Player.tscn +++ b/Scenes/Player.tscn @@ -33,7 +33,7 @@ tracks/0/keys = { [sub_resource type="BoxShape" id=4] -extents = Vector3( 0.171634, 0.185585, 0.128776 ) +extents = Vector3( 0.171634, 0.101157, 0.128776 ) [sub_resource type="CubeMap" id=5] @@ -108,8 +108,8 @@ shape_count = 1 shapes/0/shape = SubResource( 1 ) shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.42167, 0 ) shapes/0/trigger = true -collision/layers = 5 -collision/mask = 5 +collision/layers = 4 +collision/mask = 4 mode = 2 mass = 3.06122 friction = 1.0 @@ -141,6 +141,7 @@ _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) [node name="Group" type="Spatial" parent="RigidBody/Axis"] +editor/display_folded = true _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) transform/local = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0.10596 ) @@ -635,9 +636,9 @@ params/attenuation = 1.0 [node name="DecalRayCast" type="RayCast" parent="RigidBody/Axis"] _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) -transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6, 3.70208 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.514403, 3.70208 ) enabled = true -cast_to = Vector3( 0, -10000, 0 ) +cast_to = Vector3( 0, -1, 0 ) layer_mask = 8 type_mask = 1 @@ -690,10 +691,10 @@ input/ray_pickable = true input/capture_on_drag = false shape_count = 1 shapes/0/shape = SubResource( 4 ) -shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0782349, 0.0397879 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.01509, 0.0397879 ) shapes/0/trigger = true -collision/layers = 7 -collision/mask = 7 +collision/layers = 0 +collision/mask = 0 mode = 2 mass = 3.06122 friction = 0.0 @@ -711,10 +712,32 @@ velocity/angular = Vector3( 0, 0, 0 ) damp_override/linear = -1.0 damp_override/angular = -1.0 -[node name="CollisionShape" type="CollisionShape" parent="RigidBody2"] +[node name="Area" type="Area" parent="RigidBody2"] _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) -transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0782349, 0.0397879 ) +input/ray_pickable = false +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.01509, 0.0397879 ) +shapes/0/trigger = true +space_override = 0 +gravity_point = false +gravity_distance_scale = 0.0 +gravity_vec = Vector3( 0, -1, 0 ) +gravity = 9.8 +linear_damp = 0.1 +angular_damp = 1.0 +priority = 0.0 +monitoring = true +monitorable = true +collision/layers = 4 +collision/mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="RigidBody2/Area"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.01509, 0.0397879 ) shape = SubResource( 4 ) trigger = true _update_shape_index = 0 @@ -749,4 +772,8 @@ enabled = true [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] +[connection signal="area_enter" from="RigidBody2/Area" to="." method="_on_Area_area_enter"] + +[connection signal="area_exit" from="RigidBody2/Area" to="." method="_on_Area_area_exit"] + diff --git a/Scenes/Segment_Double.gd b/Scenes/Segment_Double.gd index 6c24915..2b0ec05 100644 --- a/Scenes/Segment_Double.gd +++ b/Scenes/Segment_Double.gd @@ -8,7 +8,7 @@ func _ready(): set_process(true) func _process(delta): - rotate(Vector3(0,1,0), velocity * 0.0003) + rotate(Vector3(0,1,0), velocity * 0.003) func set_material(material): get_node("REGULAR").set_material_override(material) diff --git a/Scenes/Segment_Double.tscn b/Scenes/Segment_Double.tscn index b322607..1b1101b 100644 --- a/Scenes/Segment_Double.tscn +++ b/Scenes/Segment_Double.tscn @@ -75,7 +75,7 @@ script/script = ExtResource( 1 ) [node name="REGULAR" type="MeshInstance" parent="."] _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) -transform/local = Transform( 2.05, 0, 0, 0, 4, 0, 0, 0, 2.05, 0, -0.5, 0 ) +transform/local = Transform( 2.05, 0, 0, 0, 1.7, 0, 0, 0, 2.05, 0, -0.5, 0 ) layers = 1 geometry/visible = true geometry/material_override = null diff --git a/Scenes/decal.tscn b/Scenes/decal.tscn index ddc1977..aca2f37 100644 --- a/Scenes/decal.tscn +++ b/Scenes/decal.tscn @@ -44,6 +44,7 @@ textures/shade_param_tc = 0 [node name="Quad" type="Quad"] _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1.4, 0, 0, 0, 1.4, 0, 0, 0, 1.4, 0, 0, 0 ) layers = 1 geometry/visible = true geometry/material_override = SubResource( 1 ) diff --git a/Scenes/end_line.tscn b/Scenes/end_line.tscn index 0532acf..30ee042 100644 --- a/Scenes/end_line.tscn +++ b/Scenes/end_line.tscn @@ -9,6 +9,7 @@ plane = Plane( 0, 1, 0, 0 ) [node name="Area" type="Area" groups=[ "end_line", +"deleter", ]] _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) @@ -28,8 +29,8 @@ angular_damp = 0.0 priority = 0.0 monitoring = true monitorable = true -collision/layers = 2 -collision/mask = 2 +collision/layers = 6 +collision/mask = 6 script/script = ExtResource( 1 ) [node name="CollisionShape" type="CollisionShape" parent="."] diff --git a/Scenes/first_platform.tscn b/Scenes/first_platform.tscn index fc33992..109701a 100644 --- a/Scenes/first_platform.tscn +++ b/Scenes/first_platform.tscn @@ -17,9 +17,10 @@ velocity = 0.0 _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) -[node name="Area" type="Area" parent="."] +[node name="Area" type="Area" parent="." groups=[ +"deleter", +]] -editor/display_folded = true _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.240012, 0 ) input/ray_pickable = false @@ -38,8 +39,8 @@ angular_damp = 1.0 priority = 0.0 monitoring = true monitorable = true -collision/layers = 5 -collision/mask = 5 +collision/layers = 4 +collision/mask = 4 [node name="CollisionShape" type="CollisionShape" parent="Area"] diff --git a/Scenes/platform.gd b/Scenes/platform.gd index b233972..2202229 100644 --- a/Scenes/platform.gd +++ b/Scenes/platform.gd @@ -78,7 +78,6 @@ func _on_Init_body_enter( body ): func _on_Deleter_body_enter( body ): if (!body.is_in_group("camera")): - body.get_parent().on_platform_passed() + body.get_parent().on_platform_passed() explode() - else: - body.set_sleeping(true) + diff --git a/Scenes/platform.tscn b/Scenes/platform.tscn index a2d83e2..55d5704 100644 --- a/Scenes/platform.tscn +++ b/Scenes/platform.tscn @@ -19,16 +19,17 @@ velocity = 0.0 _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) transform/local = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0, 0, 0 ) -[node name="Deleter" type="Area" parent="."] +[node name="Deleter" type="Area" parent="." groups=[ +"deleter", +]] -editor/display_folded = true _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) transform/local = Transform( 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, -0.987758, 0 ) input/ray_pickable = false input/capture_on_drag = false shape_count = 1 shapes/0/shape = SubResource( 1 ) -shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/transform = Transform( 1.18442, 0, 0, 0, 1.18442, 0, 0, 0, 1.18442, 0, -0.0609525, 0 ) shapes/0/trigger = false space_override = 0 gravity_point = false @@ -46,6 +47,7 @@ collision/mask = 4 [node name="CollisionShape" type="CollisionShape" parent="Deleter"] _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1.18442, 0, 0, 0, 1.18442, 0, 0, 0, 1.18442, 0, -0.0609525, 0 ) shape = SubResource( 1 ) trigger = false _update_shape_index = 0 diff --git a/engine.cfg b/engine.cfg index 720b7bc..5d0b5f9 100644 --- a/engine.cfg +++ b/engine.cfg @@ -10,6 +10,7 @@ global="*res://global.gd" [debug] +force_fps=60 indicators_enabled=true collision_shape_color=#7f0099b2 collision_contact_color=#ccff3319