How to set the position of a new instanced scene? [SOLVED]

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

Okay so after instancing a scene and adding it to the game, i want to set its position to be at the mouse position. My code:

var objectScene = load("res://scenes/object.tscn")
var object = objectScene.instance()
call_deferred("add_child", object)

This code is attached to a simple Node.
I want to set the position of the instanced scene through code… also, how i can get its name?

Is this 2D or 3D?

dodgyville | 2018-02-27 02:08

okay, solved this… it was 2D

GunPoint | 2018-02-27 13:57

How did you solve it?

heldt | 2018-03-22 00:13