+2 votes

I have a shooting animation with 8 directions that last long for 1 second, which was made by following this tutorial https://www.youtube.com/watch?v=gEx_Fmf-MhU&t=98s

My intend is to trigger the bullet at the seconds 0.4, which has cause the problem because my bullet is set to look at the mouse direction .At the beginning of the shooting animation (which is about 0.3 seconds before the bullet being activated) the player can change the mouse position by moving the mouse around the scene, which make the bullet play at the wrong direction.

For example, if I click the left mouse (shooting) and play an animation named "Shooting2" (which is from the tutorial means shooting down) at down direction of the player. But because the bullet is only shoot at the 0.4 seconds, the player can move around the mouse to the up direction of the player at the first 0.3 seconds, and at the time of 0.4 seconds, when the bullet is shot, it fly on top of the character while the down animation is playing. How can I prevent this?

(I'm still a high school student so my English is kinda broken, but I will appreciate if anyone can give me any ideas, and also ask if u need to know more information or just wanna see the code)

Godot version godot 3.3
in Engine by (58 points)

1 Answer

0 votes
Best answer

nvm I fixed it

by (58 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.