You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Gridmap/scripts/Map_Cursor.gd

7 lines
281 B

extends TextureRect
@export var map = TextureRect
func _process(delta):
position.x = remap(Global.world.player_position.x, 0, Global.world.width, 0, map.size.x) - size.x / 2
position.y = remap(Global.world.player_position.y, 0, Global.world.height, 0, map.size.y) - size.y / 2