0 votes

so I was trying to make a topdown shooter in this engine, and my project is probably done, but the bullet stays in the ground it floats around and stays there, making it less exciting because the bullet kills the enemy every time it approaches to me, even though the bullet is floating, so i thought i could the change the type of the node to a static by and then make it disappear after a few seconds.. help me!

Godot version 3.2.3
in Engine by (12 points)

1 Answer

+1 vote

You can't change type of node. You can disable bullet's collision when it hit something and then delete it after few seconds using timers.

# on collision
bullet.collision_mask = 0
yield(get_tree().create_timer(2.0), "timeout") # delete after 2 seconds
by (1,650 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.