hurrmmm/godot/Objects/child/child.gd

20 lines
521 B
GDScript3
Raw Normal View History

2023-11-12 02:59:43 -07:00
extends Node3D
var delta := 1.0 / float(Engine.physics_ticks_per_second)
func _ready():
Engine.get_physics_frames()
TAS_System.FrameIncremented.connect(frame_inc)
TAS_System.FramesAdvanced.connect(frames_change)
TAS_System.FramesRegressed.connect(frames_change)
func frame_inc(frame: int):
%AnimationTree.advance(delta)
func frames_change(start: int, end: int):
%AnimationTree.advance((end - start)*delta)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass