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/Instance3D.gd

13 lines
321 B

extends CharacterBody3D
var id = -1
func connect_to_world(id):
var world_entity = Global.world.entities[id]
world_entity.moving.connect(_on_entity_moving)
pass
func _on_entity_moving(new_position, speed):
var tween = get_tree().create_tween()
tween.tween_property(self, "position", new_position, 1.0/speed)
pass