RealDocs

UCharacterMovementComponent::ShouldCorrectRotation

function Engine Since 4.0
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: virtualconst

Description

Returns whether the server should include a rotation correction when sending a server move response back to the owning client.

Caveats & Gotchas

  • Default implementation always returns false — rotation is normally trusted from the client and not server-corrected, unlike location.
  • Only called on the server as part of building a client adjustment; overriding it to return true adds bandwidth and correction overhead for every move, so only enable it if you have a specific anti-cheat or precision requirement.
  • Not Blueprint-exposed and rarely overridden — most gameplay code never needs to touch this.

Signature

virtual bool ShouldCorrectRotation() const { return false; }

Return Type

bool

Example

Forcing server-authoritative rotation in a custom subclass C++
class UMyCharacterMovementComponent : public UCharacterMovementComponent
{
	virtual bool ShouldCorrectRotation() const override
	{
		// Always send rotation corrections from server to client.
		return true;
	}
};

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.