spin.gd 244 B

12345678910111213
  1. extends Node3D
  2. var increment = 0.0
  3. func _process(delta):
  4. position.x = sin(increment)
  5. position.z = cos(increment)
  6. # Avoid precision issues over time by rolling over every full turn.
  7. rotation.y = fmod(increment, TAU)
  8. increment += delta