04.07.2016, 02:34
Alright so what im trying to achieve is quite simple, when you shoot a car, its position will be change, in a way like you have kicked a ball with your leg and it will fly for lets say 20 meters.
Now my problem is huge. I suck at math. I tried doing some stuff, ended up horrible to be honest, even crashed my entire server with it once.
Now what would be the proper calculation for it?
For example I know Id have to rotate the vehicle at certain angle, like 1m every 100 ms and such (maybe 200ms) but what about the rest?
I want of it to naturaly turn this way:
A: If I shoot the car from the front, it will go backwards
B: If I shoot the car from the back it will go forward
Same like you hit a ball with ya leg.
So yeah, any suggestions? Or even some math calculations for this?
And once again, I want to achieve this with vehicles. Imagine something like /throwcar where u would launch a car to fly certain distance naturaly.
Now my problem is huge. I suck at math. I tried doing some stuff, ended up horrible to be honest, even crashed my entire server with it once.
Now what would be the proper calculation for it?
For example I know Id have to rotate the vehicle at certain angle, like 1m every 100 ms and such (maybe 200ms) but what about the rest?
I want of it to naturaly turn this way:
A: If I shoot the car from the front, it will go backwards
B: If I shoot the car from the back it will go forward
Same like you hit a ball with ya leg.
So yeah, any suggestions? Or even some math calculations for this?
And once again, I want to achieve this with vehicles. Imagine something like /throwcar where u would launch a car to fly certain distance naturaly.