VR-Engage  2.3
Loading...
Searching...
No Matches
vreHumanFrontend Library API Changes

This page covers changed human-role callbacks and new control inputs in vreHumanFrontend. It focuses on methods that affect callers and derived classes, not on additional attribute-handle members.

Breaking changes

Reload and movement callbacks now use double

Update overrides and callback registrations for these declarations:

Header and class 2.2 2.3
humanHudUpdater.h, DtHumanHudUpdater virtual void onReloadTimerChanged(float time) virtual void onReloadTimerChanged(double time)
humanAudioUpdater.h, DtHumanAudioUpdater virtual void onReloadTimerChanged(float reloadTimer) virtual void onReloadTimerChanged(double reloadTimer)
humanControlLogic.h, DtHumanControlLogic virtual void fatigueChangeCallback(float newFatigueValue) virtual void fatigueChangeCallback(double newFatigueValue)
humanControlLogic.h, DtHumanControlLogic virtual void percentOfMaxSpeedChangeCallback(float newPercentOfMaxSpeedValue) virtual void percentOfMaxSpeedChangeCallback(double newPercentOfMaxSpeedValue)

The control-logic callbacks are protected. Change the parameter types in derived overrides, and add override so the compiler detects a stale signature. The protected myFatigue and myPercentOfMaxSpeed members also changed from float to double. Update dependent member access and any forwarding callback code.

Removed movement helper

The protected DtHumanControlLogic::walkingVelocity() method returning DtVector32 was removed from vreHumanFrontend/humanControlLogic.h. Derived classes that call it must compute the movement value from the current ownship state instead; there is no same-named replacement method in this class.

Additions

Human control and input actions

DtHumanControlLogic adds virtual void toggleOverlays(double val) in vreHumanFrontend/humanControlLogic.h. DtHumanInputLogic adds a matching virtual void toggleOverlays(double val) in vreHumanFrontend/humanInputLogic.h. Bind the input action toggle-entityLabels to the input-logic method to toggle overlays through the control logic.

DtHumanInputLogic also adds virtual void cycleDroneLoiterMode(float value) and virtual void triggerDroneLoiter(float value). Use these for drone loiter input mappings instead of routing new input through a removed deployables component.

The humanControlLogic role adds grenadeLaunchDelay (seconds, default 3.0) and grenadeThrowAnimation (default "throw_grenade"). Set these role parameters when a custom throw animation has different timing or name.

One-time rendering and observer setup

DtHumanRenderUpdater::finalizeInitTick(double dt) runs after post-initialization, during player loading. Derived render updaters that override this readiness stage should preserve the base result. DtHumanObserverUpdater adds virtual void onWeaponIndexChanged(int weaponIndex) for view changes on weapon selection. Derived observer updaters can override it to customize those updates.