Godot Version
v4.2.1.stable.official [b09f793f5]
Question
In my project there’s a sprite that is meant to move erratically. I’m basing its position on a noise resource: I get the values from the noise texture and apply those to the sprite’s coordinates. This works great but… I’m accessing the coordinates from the noise resource that are bigger than the dimensions of the noise resource. So this shouldn’t work?
Here is the code I’m using to move the sprite:
extends Sprite2D
@export var NoiseSource: NoiseTexture2D
@onready var NoiseValue = NoiseSource.noise
func _process(delta):
var T # time
T = Time.get_ticks_msec()*0.01
position.x = 256+ NoiseValue.get_noise_2d(128, T)*128
and here is the noise resource:
So I’d expect that when the T goes over 64, it’ll throw an error. But it doesn’t, and it works great! What exactly is happening here, does get_noise_2d
have automatic wrapping built in?