get_global_position showing error

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

I am creating a simple game using online tutorial for learning purpose. It us showing the following error am not able to fix it. Any help?

Thanks in advance.

:bust_in_silhouette: Reply From: jgodfrey

Based on the error, your bullet_instance is a Rigidbody, which is a 3D component and does not have a position property. Is this a 2D or 3D project? A Rigidbody2D (a 2D component) does have a position property. Maybe that’s what you intended?

Yes, you are right. This is 2D game, I used RigidBody2D everything works fine.

anbarasu chinna | 2020-09-08 02:23