I fixed the bug, all I had to do was normalize the vector... What normalizing the vector does, is bring the values of the X and Y below one, but above zero, this way you simply use them as a direction vector.
also, i notice you dont have a "reload" times, what i mean is you are just in full blast automatic fire. i would put in a timer that only allows you to shoot again after a specified time period. also, if you would like i could give you some nifty collision code i had to do for a similar project. anyways, thought id just offer.
sorry, and this is bugging me a bit to, i see you fall at a constant speed, you should change that and make your acceleration -9.8m/s.
avansc 3 years ago
also, i notice you dont have a "reload" times, what i mean is you are just in full blast automatic fire. i would put in a timer that only allows you to shoot again after a specified time period. also, if you would like i could give you some nifty collision code i had to do for a similar project. anyways, thought id just offer.
avansc 3 years ago