View Rotation is currently frame-rate dependent

Hey guys,

Just came across a bug with the update of the view controller.

We noticed our camera rotation was different on our main and test maps, and I came across the following:

void APlayerController::UpdateRotation( float DeltaTime )
{
	// Calculate Delta to be applied on ViewRotation
	FRotator DeltaRot(RotationInput);

 	// ^ Should be: FRotator DeltaRot(RotationInput * DeltaTime);

...

Seems someone just missed a delta-time multiplication.

Cheers.

Hi FacePalm,

I tried to reproduce the issue that you described, and was unable to do so. Would you be able to provide some additional information?

  • What version of the Engine are you using?
  • Do you only see this happening in your own project, or can you reproduce it in a new project as well?

Currently we are running 4.5.1, but this code hasn’t changed in 4.6.
This is in the engine player controller. It is not project dependent.

It’s simply a matter of DeltaRot being incorrect.
It’s very noticeable between a low frame-rate and high frame-rate map.

Cheers.

Hey -

Thanks for bringing this to our attention. The fix you suggested (multiplying by deltaTime) would be an excellent pull request. Would you like to enter a pull request to have your suggested fix entered into the engine or would you like for us to handle this fix internally?

Cheers

It’s probably better if you guys handle it internally as your QA process is better that ours.
I should also note that you will need to take the slomo command into account when doing a fix.

I’m currently doing the following:

float InputScale = DeltaTime;

// Remove any TimeDialation
if (GetWorld())
	InputScale /= GetWorld()->GetWorldSettings()->GetEffectiveTimeDilation();

So the camera ignores any world TimeDilation.
Otherwise the camera becomes unusable when using slomo.

Cheers guys.

Hey -

I have submitted a feature request to update the UpdateRotation() function. Let us know if you have any other questions and best of luck in your project.