Here is a follow-up to one of my previous questions.
I've been trying to figure out which way a player is turning by getting the ViewRotation.Yaw.
Initially, I thought that the Yaw value was limited to 0-65536 which makes it difficult to determine which way a player is turning (left or right). This is because, as soon as the player turns through the 0/65536 spot, figuring out the way a player turned is guesswork.
However, it turns out that this 0-65536 limit is caused by casting to a rotator. This is confirmed by monitoring ViewRotation.Yaw directly or copying it directly to an int instead of saving to a rotator. It will increment or decrement "infinitely" it seems, making it very easy to figure out if a player is turning right or left.
Now, I have two questions. One is what variable type Epic used for ViewRotation and how far can a player can turn before it maxes out if ever. It can either be positive or negative which means that the variable type is signed. Another is whether the ViewRotation.Yaw value is the same offline than online. I've done some tests and it appears to be unchanged but I'd like a confirmation as well as any possible problems I might encounter using this value on a dedicated server.
P.S: ViewRotation.Pitch is, on the other hand, limited to a range.
I've been trying to figure out which way a player is turning by getting the ViewRotation.Yaw.
Initially, I thought that the Yaw value was limited to 0-65536 which makes it difficult to determine which way a player is turning (left or right). This is because, as soon as the player turns through the 0/65536 spot, figuring out the way a player turned is guesswork.
However, it turns out that this 0-65536 limit is caused by casting to a rotator. This is confirmed by monitoring ViewRotation.Yaw directly or copying it directly to an int instead of saving to a rotator. It will increment or decrement "infinitely" it seems, making it very easy to figure out if a player is turning right or left.
Now, I have two questions. One is what variable type Epic used for ViewRotation and how far can a player can turn before it maxes out if ever. It can either be positive or negative which means that the variable type is signed. Another is whether the ViewRotation.Yaw value is the same offline than online. I've done some tests and it appears to be unchanged but I'd like a confirmation as well as any possible problems I might encounter using this value on a dedicated server.
P.S: ViewRotation.Pitch is, on the other hand, limited to a range.
Last edited: