Update perceived objects
This commit is contained in:
parent
70b068f870
commit
2a221a0c22
@ -44,8 +44,15 @@ void Roboid::Update(float currentTimeMs) {
|
||||
if (perception != nullptr)
|
||||
perception->Update(currentTimeMs);
|
||||
|
||||
if (propulsion != nullptr)
|
||||
if (propulsion != nullptr) {
|
||||
propulsion->Update(currentTimeMs);
|
||||
SetPosition(this->worldPosition +
|
||||
this->worldOrientation * Vector3::forward *
|
||||
this->propulsion->GetVelocity().distance);
|
||||
SetOrientation(this->worldOrientation *
|
||||
Quaternion::AngleAxis(this->propulsion->GetAngularVelocity(),
|
||||
Vector3::up));
|
||||
}
|
||||
|
||||
if (networkSync != nullptr)
|
||||
networkSync->NetworkUpdate(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user