|
VR-Engage
2.2
|
The DtDeadReckonOverrider modifies dead reckoning settings for the ownship entity when it is engaged. Specifically, it disables acceleration-based prediction and smoothing to provide more responsive and accurate control when a player is directly controlling the entity.
This component automatically locates the scene object and its dead reckoning updater, then modifies the settings. When the component is shut down or the scene object is deleted, the original settings are restored.
#include <deadReckonOverrider.h>
Public Member Functions | |
| DtDeadReckonOverrider () | |
| virtual | ~DtDeadReckonOverrider () override |
| virtual bool | initialize (DtPlayerStation *player, DtInitTable &config) override |
| virtual bool | postInitialize () override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Member Functions | |
| bool | findSceneObject () |
| bool | findDeadReckonUpdater () |
| void | slot_sceneObjectToBeDeleted (const makVrv::DtUniqueID &id) |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
Protected Attributes | |
| makVrv::DtSceneObject * | mySceneObject |
| makVrv::DtDeadReckonUpdater * | myDeadReckonUpdater |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| makVre::DtDeadReckonOverrider::DtDeadReckonOverrider | ( | ) |
Constructor for DtDeadReckonOverrider.
Initializes the component with null pointers for scene object and dead reckoning updater.
|
overridevirtual |
Virtual destructor for DtDeadReckonOverrider.
|
overridevirtual |
Initializes the component with configuration from Lua.
Performs basic initialization using the parent class implementation.
| player | Pointer to the player station this component belongs to |
| config | Configuration table containing initialization parameters |
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Performs post-initialization setup.
Called after all components have been initialized.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Updates the component state.
Attempts to find the scene object and dead reckoning updater if not already found, then modifies the dead reckoning settings to disable acceleration-based prediction and smoothing.
| dt | Delta time in seconds since the last tick |
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Shuts down the component.
Disconnects from the scene object's deletion signal and restores original dead reckoning settings if the engine is not being destroyed.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the component type identifier.
Implements makVre::DtPlayerComponent.
|
protected |
Locates the scene object for the player's entity.
Attempts to find the scene object corresponding to the player's element ID. If found, connects to the scene object's deletion signal to handle cleanup.
|
protected |
Locates the dead reckoning updater for the scene object.
Searches through the scene object's updater chain to find a dead reckoning updater.
|
protected |
Signal handler for scene object deletion.
Called when the connected scene object is about to be deleted. Performs cleanup by disconnecting signals and clearing pointers.
| id | The unique ID of the scene object being deleted |
|
protected |
Pointer to the scene object for the player's entity.
|
protected |
Pointer to the dead reckoning updater for the scene object.