rotationManager.onUpdate

onUpdate(onUpdate): void

Register the main rotation callback. This is where you call rotate().

Parameters

onUpdate

Function

Function(updateNoRotateFn) invoked every tick.

Returns

void

Example

rotationManager.onRotate((updateNoRotate) => {
    // Simple aim step
    rotationManager.rotate(targetYaw, targetPitch, 8.0);
});

Last updated