Original Post
I have a bullet class. In that bullet class, there is an init method that looks like this: void init(double fromX, double fromY, double fromZ, double approachX, double approachY, double approachZ, double speed); Every time the player shoots, the bullet looks like this: //view_angle is the horizontal angle that the player is looking (in radians) //sight is the verticle angle that the player is looksing (in radians) b.init(player1->getX() + cos(view_angle)*cos(sight)*200,player1->getY() + sin(sight), player1->getZ() + sin(view_angle)*cos(sight), cos(view_angle)*cos(sight)*500, sin(sight)*500, sin(view_angle)*cos(sight)*500, 1000); I have two questions. 1. Are the parameters that I entered in the above init function correct? 2. In my main function, I want to call b.approach() which approaches whatever approachX approachY and approachZ were most recently set to. Whats the best way to write this function? Thanks for your help. If you see a better way to designe the Bullet class, please let me know.