agi_pivot.gd 330 B

12345678910111213141516171819
  1. extends Spatial
  2. var def_rotspeed = -0.5
  3. var rotspeed = def_rotspeed
  4. func _process(delta):
  5. rotation_degrees+=Vector3(0.0,rotspeed,0.0)
  6. func stop(body):
  7. print("detecting collision")
  8. if body.name == "Player":
  9. print("player collision")
  10. rotspeed = 0
  11. func start(body):
  12. if body.name == "Player":
  13. rotspeed = def_rotspeed