How to shift a vector based on the rotation of another vector?
- by bpierre
I’m learning 2D programming, so excuse my approximations, and please, don’t hesitate to correct me. I am just trying to fire a bullet from a player. I’m using HTML canvas (top left origin).
Here is a representation of my problem:
The black vector represent the position of the player (the grey square).
The green vector represent its direction.…