extends PushingBodyPart onready var anim = get_node("Mesh/AnimationPlayer") # Called when the node enters the scene tree for the first time. func _ready() -> void: pass # Replace with function body. func _is_animation_playing(): return anim.is_playing() func action(): anim.play("ArmatureAction") func push(body): # We multiply by 0.1 because we only want it to spin slightly, it should mostly go up var offset = transform.basis.xform(touch_area.global_transform.origin - base.global_transform.origin) * 0.3 var direction = (base.transform.basis.y - base.transform.basis.z).normalized() * 10.0 base.apply_impulse(offset, direction) #base.apply_torque_impulse(base.transform.basis.y * 20.0) # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta: float) -> void: # pass