Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Sprite
- # member variables here, example:
- # var a=2
- # var b="textvar"
- var amplitude = 100
- var step = 0
- var pos = get_pos()
- func _ready():
- # Called every time the node is added to the scene.
- set_process(true)
- pass
- func _process(delta):
- var pos = get_pos()
- step = step + .1
- print(sin(step))
- set_pos(Vector2(sin(step)*amplitude,0))
- print(pos.x)
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement