Been working with the "apply camera object rotation for player X" trigger and the "current camera yaw for player X" real function and I've had some problems.
If I set the rotation of a players camera to lets say 50 and then ask for the current camera yaw I end up getting back something like 49.92724. It generates different values for each angle. This is quite a bother to my map production. Does anyone know a way to fix this. Maybe certain camera fields have to be changed? Anyone else have this problem and found a way around it?
Yea sorry, I should have been a little more specific on what i am trying to do. The idea is to put a cap on how fast a player can rotate his camera using the Mouse Rotation trigger. I wanted to limit it to lets say... 10 degrees per game loop.
The only solution I could come up with was to set the Mouse Rotation sensitivity to a low value (0.0005). Then read the small differences between the players old camera rotation and the new camera rotation. Using these small changes in the camera (cause of the low sensitivity), I would then rotate the players camera based on the value (after checking to see whether said player was within the 10 degree limit).
This method doesn't work because the error between Camera Rotation (ex. 50.0) and Camera Yaw (ex. 49.9347ish) make it seem as though the player is constantly moving his mouse.
Does anyone know another method for capping a players Mouse Rotation to a certain degree.
Sorry if that was confusing, I don't forum much, let alone write.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Been working with the "apply camera object rotation for player X" trigger and the "current camera yaw for player X" real function and I've had some problems. If I set the rotation of a players camera to lets say 50 and then ask for the current camera yaw I end up getting back something like 49.92724. It generates different values for each angle. This is quite a bother to my map production. Does anyone know a way to fix this. Maybe certain camera fields have to be changed? Anyone else have this problem and found a way around it?
BUMP. I'm going to pull my eyes out and eat them.
Not sure what the problem is. When you set it to 50, it doesn't always set it to exactly 50, it sets it to as close as it can. In this case 49.92724
Why do you need such an exact value? Maybe there's another way to achieve what you want.
In the worst case you can always round.
Yea sorry, I should have been a little more specific on what i am trying to do. The idea is to put a cap on how fast a player can rotate his camera using the Mouse Rotation trigger. I wanted to limit it to lets say... 10 degrees per game loop.
The only solution I could come up with was to set the Mouse Rotation sensitivity to a low value (0.0005). Then read the small differences between the players old camera rotation and the new camera rotation. Using these small changes in the camera (cause of the low sensitivity), I would then rotate the players camera based on the value (after checking to see whether said player was within the 10 degree limit).
This method doesn't work because the error between Camera Rotation (ex. 50.0) and Camera Yaw (ex. 49.9347ish) make it seem as though the player is constantly moving his mouse.
Does anyone know another method for capping a players Mouse Rotation to a certain degree.
Sorry if that was confusing, I don't forum much, let alone write.