Last active
December 14, 2020 01:47
-
-
Save GK-GreyGhost/dc98a3ffb2315090b1c76a2245f4b893 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Spatial | |
tool | |
var time:float = 0.0 | |
export var time_scale:float = 1.0 | |
export var distance_from_object:float = 6.0 | |
export var look_at_position:Vector3 = Vector3(0,0,0) | |
func _process(delta): | |
time += delta * time_scale | |
translation.x = sin(time) * distance_from_object | |
translation.z = cos(time) * distance_from_object | |
look_at(look_at_position,Vector3.UP) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment