Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Erdo |
I’m trying to add underwater sound effect and I need to detect this every frame.
But my sound effect only loops 0.1ms. How can ı fix that problem?
func _process(delta):
if transform.origin.y < -7.2:
$"/root/World/UI/Effect/UnderWater".show()
$UnderWater.play()
vel.y += 0.1
freeCamera = true
else:
$"/root/World/UI/Effect/UnderWater".hide()
$UnderWater.stop()
freeCamera = false