|
Post by okeanix on Feb 23, 2018 13:56:40 GMT
There is Default and Aiming State but problem is.
Default going slower after aiming. Its like there is third state? When restarting scene it goes back normal but after aiming and release aim its going bad again.
|
|
|
Post by Invector on Feb 23, 2018 14:20:09 GMT
Check your "Smooth Between State" value, the default is 6
|
|
|
Post by okeanix on Feb 23, 2018 14:29:01 GMT
Check your "Smooth Between State" value, the default is 6 Not changed. My Default Sensitivity changes after Aiming(permanently). Thats my problem.
|
|
|
Post by Invector on Feb 23, 2018 14:32:20 GMT
That shouldn't happen... do you have a AimCanvas in the scene?
|
|
|
Post by okeanix on Feb 23, 2018 14:33:40 GMT
That shouldn't happen... do you have a AimCanvas in the scene? Yes i have. Default Sensitivity going slower after aiming and can't find proper way to fix this in hours. Also i have one more question How can i add sensitivity option because i can't change after Init
|
|
|
Post by Invector on Feb 23, 2018 14:40:21 GMT
Try creating a new character in a new scene to see if it still happens
|
|
|
Post by okeanix on Feb 23, 2018 14:45:55 GMT
Try creating a new character in a new scene to see if it still happens How can i add sensitivity option because i can't change after Start EDIT: Okay I did with this if (currentStateName == "Default") { mouseX += x * PlayerPrefs.GetFloat("Sensitivity"); mouseY -= y * PlayerPrefs.GetFloat("Sensitivity"); Debug.Log("Default"); } else if (currentStateName == "Aiming") { mouseX += x * PlayerPrefs.GetFloat("AIMSensitivity"); mouseY -= y * PlayerPrefs.GetFloat("AIMSensitivity"); Debug.Log("Aiming"); }
|
|
|
Post by Invector on Feb 23, 2018 16:05:01 GMT
Here is another example for you:
private void OnGUI() { if (tpCamera == null) return;
for (int i = 0; i < tpCamera.CameraStateList.tpCameraStates.Count; i++) { GUILayout.Box(tpCamera.CameraStateList.tpCameraStates[i].Name); tpCamera.CameraStateList.tpCameraStates[i].xMouseSensitivity = GUILayout.HorizontalSlider(tpCamera.CameraStateList.tpCameraStates[i].xMouseSensitivity, 0, 6); } }
|
|