SFML community forums

Help => Graphics => Topic started by: Jan666 on May 30, 2022, 10:44:57 am

Title: Bullets turn direction failure
Post by: Jan666 on May 30, 2022, 10:44:57 am
Hello, i have a bullet direction Problem. I want that my Player can shot bullets to the right and left direction. I used this piece of code for that (I used setScale for flip the Players Direction):
bulletVec[i].bltFire(0, 2 * plr.plrSprite.getScale().x);
 
The Problem noq is that the firing Bullets always turning the direction when i turn the players direction, how i can change this?
Title: Re: Bullets turn direction failure
Post by: eXpl0it3r on May 31, 2022, 09:44:40 am
Don't make the movement depend on the player's current orientation.
The bullet should know their own speed and movement direction and the direction should only be set once when the bullet is created.