4 #include "../graphics/Vector.h"
26 Vector<float> Dir() const {
27 return Vector<float>::FromPolar(1, orient);
29 Vector<float> Acc() const {
30 float force = (linThrottle < 0 ? revForce : linForce);
31 return Dir() * force / mass * linThrottle;
36 float RotAcc() const {
37 return rotForce / mass * rotThrottle;
40 float linThrottle = 0;
41 float rotThrottle = 0;
44 void Update(float delta) {
45 rotVel += RotAcc() * delta;
46 orient += rotVel * delta;