Event OnMouseScroll. Scale the camera.
- Parameters
-
- Returns
- true if we need block the event
Definition at line 80 of file CameraController.cpp.
81 {
83
85
87
88 const float delta =
e.GetYOffset() * 0.1f;
89
92
94 {
96 }
97
101 return false;
102 }
#define SPICES_PROFILE_ZONE
uint32_t m_ViewportWidth
The Viewport size.
std::shared_ptr< Camera > m_Camera
The camera smart pointer get from owner's camera component.
void MouseZoom(const float &delta)
Calculate Camera Zoom.
void UpdateView() const
Setting camera transform component position. We already set rotation in MouseRotate().
uint32_t m_ViewportHeight
float m_ZoomLevel
Zoom Level, for orthographic type camera.
static std::shared_ptr< SlateRegister > GetRegister()
Get slate register.
@ Orthographic
orthographic
References Spices::MouseScrolledEvent::GetYOffset(), m_ViewportHeight, m_ViewportWidth, m_ZoomLevel, MouseZoom(), and UpdateView().
Referenced by OnEvent().