The ExtendedMove::pack() function will write 360 bits of data into every move packet even if no tracked devices are present. This can be verified by building a project with the TORQUE_EXTENDED_MOVE flag set, placing a breakpoint at https://github.com/GarageGames/Torque3D/blob/development/Engine/source/T3D/gameBase/extended/extendedMove.cpp#L148, launching the game with no tracked devices connected and stepping through to see every value get sent in full. All of the values being compared from the current move have already been clamped/unclamped and because of floating-point errors 0.0f != UNCLAMPPOS(CLAMPPOS( 0.0f )). This PR creates a clamped copy of the NullExtendedMove to use for comparisons in the pack function so the full extended tracking data is only sent for devices that are connected and tracking. The initial rotation values have been changed to reflect the change from QuatF to AngAxisF and prevent the mDegToRad() call here from causing an empty move to differ from the default.
This PR is being withdrawn in favor of an ExtendedMove cleanup that will remove Euler rotations and mask off inactive devices eliminating the need for this.
The
ExtendedMove::pack()
function will write 360 bits of data into every move packet even if no tracked devices are present. This can be verified by building a project with the TORQUE_EXTENDED_MOVE flag set, placing a breakpoint at https://github.com/GarageGames/Torque3D/blob/development/Engine/source/T3D/gameBase/extended/extendedMove.cpp#L148, launching the game with no tracked devices connected and stepping through to see every value get sent in full. All of the values being compared from the current move have already been clamped/unclamped and because of floating-point errors0.0f != UNCLAMPPOS(CLAMPPOS( 0.0f ))
. This PR creates a clamped copy of the NullExtendedMove to use for comparisons in the pack function so the full extended tracking data is only sent for devices that are connected and tracking. The initial rotation values have been changed to reflect the change from QuatF to AngAxisF and prevent themDegToRad()
call here from causing an empty move to differ from the default.