Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CEditorMoveCamera Class Reference

The object class supports camera movement with arrow keys, but only when the right mouse button is pressed and held. More...

#include <Camera/CEditorMoveCamera.h>

Inheritance diagram for Skylicht::CEditorMoveCamera:
Skylicht::CFpsMoveCamera Skylicht::CComponentSystem Skylicht::IActivatorObject

Public Member Functions

virtual void initComponent ()
virtual void updateComponent ()
virtual bool OnEvent (const SEvent &event)
Public Member Functions inherited from Skylicht::CFpsMoveCamera
virtual void endUpdate ()
 Updates the camera position based on input state. Called at the end of the frame.
void setKeyMap (const std::vector< SKeyMap > &keyMap)
 Sets a custom key map for movement.
void setMoveSpeed (float s)
 Sets the movement speed.
Public Member Functions inherited from Skylicht::CComponentSystem
const char * getName ()
virtual void reset ()
virtual void startComponent ()
virtual void onEnable (bool b)
virtual void onUpdateCullingLayer (u32 mask)
virtual CObjectSerializablecreateSerializable ()
virtual void loadSerializable (CObjectSerializable *object)
void setEnable (bool b)
bool isEnable ()
CGameObject * getGameObject ()
void setEnableSerializable (bool b)
bool isSerializable ()
void addLinkComponent (CComponentSystem *comp)
void removeAllLink ()
Public Member Functions inherited from Skylicht::IActivatorObject
virtual ~IActivatorObject ()
 Virtual destructor for polymorphic activator objects.

Additional Inherited Members

Public Types inherited from Skylicht::CFpsMoveCamera
enum  EMoveDirection {
  MoveForward = 0 , MoveBackward , StrafeLeft , StrafeRight ,
  DirectionCount
}
 Directions for FPS-style movement.
Static Public Member Functions inherited from Skylicht::CComponentSystem
static int useComponent (CComponentSystem *used)
Protected Member Functions inherited from Skylicht::CComponentSystem
void setOwner (CGameObject *obj)
Protected Attributes inherited from Skylicht::CFpsMoveCamera
CCameram_camera
 Pointer to the CCamera component.
std::vector< SKeyMapm_keyMap
 List of key mappings for movement.
bool m_input [DirectionCount]
 Array tracking the pressed state of each move direction.
f32 m_moveSpeed
 Movement speed multiplier.
Protected Attributes inherited from Skylicht::CComponentSystem
CGameObject * m_gameObject
bool m_enable
bool m_serializable
std::vector< CComponentSystem * > m_linkComponent

Detailed Description

The object class supports camera movement with arrow keys, but only when the right mouse button is pressed and held.

This component extends CFpsMoveCamera by requiring a right-mouse-button press (via CEditorCamera) to enable WASD/Arrow key movement, mimicking common 3D editor navigation.

Member Function Documentation

◆ initComponent()

virtual void Skylicht::CEditorMoveCamera::initComponent ( )
virtual

Reimplemented from Skylicht::CFpsMoveCamera.

◆ OnEvent()

virtual bool Skylicht::CEditorMoveCamera::OnEvent ( const SEvent & event)
virtual

Reimplemented from Skylicht::CFpsMoveCamera.

◆ updateComponent()

virtual void Skylicht::CEditorMoveCamera::updateComponent ( )
virtual

Reimplemented from Skylicht::CFpsMoveCamera.


The documentation for this class was generated from the following file: