Also interpolate taxi and interactive objects
This commit is contained in:
1 parent
28846b9f25
commit
1ab9f300b6
5 files changed
+213
-28
No files matched your search
@@ -19,6 +19,7 @@
|
||||
#include "LocationGameState.h"
|
||||
#include <functional>
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <unordered_map>
|
||||
#include "Character.h"
|
||||
|
||||
@@ -265,6 +266,21 @@ namespace FRG
|
||||
|
||||
PathVisualization pathVisualization;
|
||||
|
||||
struct NpcCarPresentationSample {
|
||||
Eigen::Vector3f position = Eigen::Vector3f::Zero();
|
||||
float rotation = 0.f;
|
||||
float wheelAngle = 0.f;
|
||||
float steeringAngle = 0.f;
|
||||
};
|
||||
|
||||
NpcCarPresentationSample previousNpcCarPresentation_;
|
||||
NpcCarPresentationSample currentNpcCarPresentation_;
|
||||
std::chrono::steady_clock::time_point lastNpcCarPresentationUpdate_;
|
||||
bool hasNpcCarPresentationSample_ = false;
|
||||
|
||||
void captureNpcCarPresentation(const NpcCar& car);
|
||||
NpcCarPresentationSample interpolatedNpcCarPresentation(const NpcCar& car) const;
|
||||
|
||||
};
|
||||
|
||||
} // namespace FRG
|
||||
Reference in new issue
Block a user