Do anyone know how to make bullets shoot in the direction the player is heading or where the mouse is?
Like in a top down shooter!
Thanks
Do anyone know how to make bullets shoot in the direction the player is heading or where the mouse is?
Like in a top down shooter!
Thanks
Vector2 mouse;
Vector2 player;
Vector2 dir = Vector2.Normalize(mouse-player);
Thanks! But do I just dir.Y += 2; or???
bulletposition += dir*(speedofthebullet)
Oh, thank you so much!