get_pos function shows error in Area2D in 3.0

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sanjib
:warning: Old Version Published before Godot 3 was released.

My script is working in godot 2.1, but am getting “Invalid Call. Nonexistent function get_pos in base Area2D” in 3.0. Can anyone help me on this?

:bust_in_silhouette: Reply From: mollusca

It’s been changed to a member variable, so it should be simply self.position. From the latest Node2D docs:

Vector2 position - Position, relative to the node’s parent.

thank you mollusca

sanjib | 2018-01-24 07:01