View difference between Paste ID: rCGsEKPn and Zi8zSftJ
SHOW: | | - or go back to the newest paste.
1
func patrol(x):
2
	return 0.5 * (1 - cos(2 * pi * x))
3
4-
	index = 0.5 * (1 - cos(2 * pi * time / period))
4+
5
	time += delta
6
	period = 2 * curve.get_baked_length() / speed
7
	index = patrol(time / period)
8
	set_pos(curve.interpolate_baked(index))