Extend map camera controller
This commit is contained in:
@@ -45,6 +45,13 @@ namespace OpenVulkano
|
||||
}
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
m_actionUp->BindKey(Input::InputKey::Controller::AXIS_LEFT_Y);
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace OpenVulkano
|
||||
m_dirSide = side;
|
||||
}
|
||||
|
||||
void SetSliceHeight(float height);
|
||||
|
||||
void Tick() override;
|
||||
|
||||
void SetDefaultKeybindings();
|
||||
|
||||
Reference in New Issue
Block a user