diff --git a/COGITO/Assets/Shader/ShaderPrecompiler.gd b/COGITO/Assets/Shader/ShaderPrecompiler.gd index df60f735..788f37f4 100644 --- a/COGITO/Assets/Shader/ShaderPrecompiler.gd +++ b/COGITO/Assets/Shader/ShaderPrecompiler.gd @@ -24,7 +24,7 @@ static func precompile(tree : SceneTree, shader : ShaderMaterial, use_new_node : compiler.position = Vector3(0,0,-0.1) # position self in front of camera compiler.cast_shadow = 0 - compiler.custom_aabb = AABB(compiler.global_position, Vector3.ONE*100) # make sure we're always rendering + compiler.custom_aabb = AABB(compiler.position, Vector3.ONE*100) # make sure we're always rendering tree.root.get_camera_3d().add_child(compiler) else: diff --git a/COGITO/Components/Attributes/CogitoHealthAttribute.gd b/COGITO/Components/Attributes/CogitoHealthAttribute.gd index ce6346eb..55c54fa6 100644 --- a/COGITO/Components/Attributes/CogitoHealthAttribute.gd +++ b/COGITO/Components/Attributes/CogitoHealthAttribute.gd @@ -41,11 +41,11 @@ func on_death(_attribute_name:String, _value_current:float, _value_max:float): parent_position = get_parent().global_position if sound_on_death: - Audio.play_sound_3d(sound_on_death).global_position = parent_position + Audio.play_sound_3d(sound_on_death).position = parent_position if spawn_on_death: var spawned_object = spawn_on_death.instantiate() - spawned_object.global_position = parent_position + spawned_object.position = parent_position get_tree().current_scene.add_child(spawned_object) for nodepath in destroy_on_death: diff --git a/COGITO/Scripts/Cogito_Spawnzone.gd b/COGITO/Scripts/Cogito_Spawnzone.gd index 61ef9545..328951ed 100644 --- a/COGITO/Scripts/Cogito_Spawnzone.gd +++ b/COGITO/Scripts/Cogito_Spawnzone.gd @@ -22,7 +22,7 @@ func spawn_objects(): spawn_point.z = randf_range(spawn_area.global_position.z - spawn_area.shape.size.z, spawn_area.global_position.z + spawn_area.shape.size.z ) var spawned_object = object_to_spawn.instantiate() - spawned_object.global_position = spawn_point + spawned_object.position = spawn_point get_tree().current_scene.add_child(spawned_object) left_to_spawn -= 1