Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | RZaga |
I’m adding an opening transition animation and I want the node and its children (consisting of stuff such as kinematicbodies and such) to not do anything until the animation finishes. Only problem is that does not seem to work and the kinematicbodies still do stuff before they’re supposed to. This is on version 3.3.2
I want to ask why this could be happening and what I could do to fix this? Thanks
Code snippet below:
extends Node2D
onready var circleTransitionAnim = $CircleTransition/AnimationPlayer
func _ready():
circleTransitionAnim.play("transition_in")
set_physics_process(false)
func _on_AnimationPlayer_animation_finished(anim_name):
set_physics_process(true)
*EDIT FOR CLARITY:
My node has several child nodes each with _physics_process()
functions and THOSE are the ones I want to disable. I have since tried the code snippet below but it also does not work
func _ready():
for i in get_children():
set_physics_process(false)
Any other solutions I could try?
*UPDATE:
I’m an idiot and forgot to make it i.set_physics_process(false)
insted of just set_physics_process(false)
. It’s working fine now.