extends MeshInstance3D | |
var velocity: Vector3 = Vector3(2, 0, 0) | |
var interval: float = 0.0 | |
func _ready(): | |
SceneRewinder.register_variable(self, "translation") | |
SceneRewinder.register_variable(self, "velocity") | |
SceneRewinder.register_variable(self, "interval") | |
SceneRewinder.register_process(self, "process_motion") | |
func process_motion(delta): | |
interval += delta | |
if interval > 1.0: | |
interval = 0.0 | |
velocity = velocity.rotated(Vector3(0, 0, 1), deg2rad(90)) | |
translation += velocity * delta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment