I am making a platformer game in C++ using SFML and Box2D libraries. The player has a pistol, I'm trying to implement shooting.
Box2D has a RayCast function, which needs two positions to check for intersections between. I have the player position and the mouse position. Currently the line checks between those two, not ideal.
I need a third position, which is the position, where the pistol shot would end. The distance between the player position and the third position should always be 1000.