Advertisement
Joshua_Blackmon

Moving flowers

Oct 11th, 2021
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. extends Spatial
  2.  
  3.  
  4. var proxy:bool = true
  5.  
  6. func _process(delta):
  7. var player = get_parent().get_child(1)
  8. if translation.distance_to(player.translation) < 0:
  9. translation.distance_to(player.translation) == translation.distance_to(player.translation) * -1
  10. if translation.distance_to(player.translation) < 7:
  11. look_at(player.translation,Vector3.UP)
  12. else: rotation_degrees.z = 0
  13.  
  14.  
  15. # Called every frame. 'delta' is the elapsed time since the previous frame.
  16. #func _process(delta):
  17. # pass
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement