APawn::GetRemoteViewPitch
#include "GameFramework/Pawn.h"
Access: public
Specifiers: inlineconst
Description
Returns the replicated pitch of a remote client's view as a 16-bit compressed value. Use this on non-owning clients and servers to read where a remote player is looking vertically.
Caveats & Gotchas
- • The returned value is a 16-bit integer mapping 360 degrees of pitch, *not* a float in degrees. Convert with `FRotator::DecompressAxisFromShort(GetRemoteViewPitch())` to get degrees.
- • The old `uint8 RemoteViewPitch` property is deprecated in 5.6 in favour of the 16-bit `RemoteViewPitch16` accessed via this function — using the deprecated property gives lower angular precision.
Signature
inline uint16 GetRemoteViewPitch() const Return Type
uint16 Example
Convert remote pitch to degrees for animation blending C++
float PitchDegrees = FRotator::DecompressAxisFromShort(MyPawn->GetRemoteViewPitch());
// Use PitchDegrees to drive an aim-offset animation blend space. See Also
Version History
Introduced in: 5.6
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | Switched from uint8 (8-bit) to uint16 (16-bit) precision; the old RemoteViewPitch uint8 property is deprecated. |
Feedback
Was this helpful?