I want to make the bullet going in the direction where the player was aiming. It's a Top Down Shooter 2d game. How Can i make it?
You can rotate the bullet so it matches the player’s rotation, and then use something like velocity = Vector2(cos(rotation), sin(rotation) * bullet_speed to move the bullet :smile:
velocity = Vector2(cos(rotation), sin(rotation) * bullet_speed
@TwistedTwigleg said: You can rotate the bullet so it matches the player’s rotation, and then use something like velocity = Vector2(cos(rotation), sin(rotation) * bullet_speed to move the bullet :smile:
thanks