Extend map camera controller
This commit is contained in:
@@ -44,6 +44,13 @@ namespace OpenVulkano
|
||||
CURRENT_FRAME.needsRedraw = true;
|
||||
}
|
||||
}
|
||||
|
||||
void MapCameraController::SetSliceHeight(float height)
|
||||
{
|
||||
float diff = height - GetCamera()->GetPosition().y;
|
||||
GetCamera()->SetMatrix(Math::Utils::translate(Math::Vector3f_SIMD{0,diff,0}) * GetCamera()->GetMatrix());
|
||||
CURRENT_FRAME.needsRedraw = true;
|
||||
}
|
||||
|
||||
void MapCameraController::SetDefaultKeybindings()
|
||||
{
|
||||
|
||||
@@ -35,9 +35,11 @@ namespace OpenVulkano
|
||||
m_dirUp = up;
|
||||
m_dirSide = side;
|
||||
}
|
||||
|
||||
void SetSliceHeight(float height);
|
||||
|
||||
void Tick() override;
|
||||
|
||||
void SetDefaultKeybindings();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user