I’m thinking about implementing something like bullet physics into my game or even for things like rockets and was wondering how I would start with this. Off the top of my head I believe I will need the following things:
Math.atan2 for the angle to the mouse location
Gravity
Speed of the bullet
Velocity
My initial thoughts tell me that i’ll need to first get the angle to the mouse location to fire the bullet at. Then velocity will be effected by gravity, pulling the bullet down towards to floor while also making sure to use the speed of the bullet. Am I missing anything? I’d ideally like to try and code it myself as I think i’ll learn a lot better and be able to implement my own versions depending on my need when and where