【发布时间】:2020-06-22 23:28:12
【问题描述】:
在 godot 我有 ParallaxLayer
extends ParallaxLayer
var motion = Vector2(-50, 0)
var start_pos = Vector2()
var speed = -50
# Called when the node enters the scene tree for the first time.
func _ready():
set_mirroring(motion)
pass
func _process(delta):
speed -= 5
set_motion_offset(motion+Vector2(speed,0))
此代码使背景滚动但不是无限的
滚动到结尾时我不知道该怎么办
官方文档说我应该使用 set_mirroring
谁能告诉我如何使用这个功能?
或者我应该去哪里了解更多信息?
【问题讨论】:
标签: godot