Change the direction of the instanced tilemap.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Yasin

In my project the platform ( tilemap ) spawns as the player moves. But the platform only spawns as the player moves backwards . It doesn’t spawn as the player moves forward. Can anyone please tell me how I can instance the platform as the player moves forward ?

Here is the project Spawner
Here is the video which I used as reference video

:bust_in_silhouette: Reply From: njamster

Can anyone please tell me how I can instance the platform as the player moves forward?

In spawn_Ground.gd change the sign of GROUND_HEIGHT so it looks like this:

func go_next_pos():
	set_position(  Vector2(0, -GROUND_HEIGHT) + get_position() )

In Node2D.tscn reset the position of the bottom_right-node back to (0, 0) - now it’s actually in the top-left - and then change the condition in the script to this:

func _process(delta):
	if bottom_right.get_global_position().y > camera.get_total_pos().y:
		queue_free()
		emit_signal("destroyed")

Thank you so much for your assistance.

Yasin | 2020-05-04 15:14

Can you please help me as I have got one more problem.
I have posted the Question

Yasin | 2020-05-04 15:15