#i am new to godot but i need help with GD script (solved)
7 messages · Page 1 of 1 (latest)
what type of node is the object you want to move? Rigidbody, Characterbody, Node2d/3d?
is is a area2D node
Should be able to set its global_position to a coordinate.
position works too, but that can cause problems if it's parented to another object.
the coordinate will need to be represented by a Vector2.
Code wise, uh
area2dname.global_position = Vector2(x, y)
where area2dname is a reference to your area node, and x and y the coordinates.
If this function is in a script the area2D has attached to it, you can omit area2dname. and just set global_position directly.
thanks