|
Post by ibuckly on Jul 10, 2020 4:53:04 GMT
Hi there,
I have difficulties changing the camera state when crouching and aiming. Now I've created a new camera state, but can't find how to use it. I found the script where the camera state changes when crouching.
vThirdPersonInput.cs
if (cc.isCrouching)
tpCamera.ChangeState("Crouch", true);
But where can I add the script piece like below?
if (cc.isCrouching && ((isAiming)example))
tpCamera.ChangeState("CrouchAiming", true);
Any help is welcome!!
|
|
|
Post by gubwe on Jul 12, 2020 22:32:41 GMT
im guessing you're not happy with the the way the character aims when crouching. what i did was copy the values on the camera state fro aiming and then put them on the crouch state so when you crouch the camera is much closer to the shoulder then you just tweak it to taste.
|
|
|
Post by ibuckly on Jul 16, 2020 1:35:45 GMT
It's not that I don't like the way the character aims. I've changed the animations anyway. But for me it is important that the camera zooms in when the character aims. Anyhow, I found it's solution. Just added a piece of code and everything works fine.
in the vShooterMeleeInput.cs i added this piece of line: Just took the code from line 810 till 817
if (changeCameraState) tpCamera.ChangeState(customCameraState, customlookAtPoint, true); else if (cc.isCrouching && !_isAiming) tpCamera.ChangeState("Crouch", true); // new piece of code ////////////////////////////// else if (cc.isCrouching && _isAiming) tpCamera.ChangeState("CrouchAiming", true); /////////////////////////////////////////////////// else if (cc.isStrafing && !_isAiming) tpCamera.ChangeState("Strafing", true);
|
|
|
Post by ibuckly on Nov 24, 2020 0:16:39 GMT
Where can I change the script for the camera state in this new update (2.5.4)?
|
|