|
Post by komposite on Feb 28, 2019 12:59:11 GMT
Hey guys !
Currently, in the Invector Controller, when you want to go into strafe mode or lock on, you need to press to enable the lock on / strafe, and to press again to disable.
I'd like to change that for a "lockon/strafe when you press the button, stop it when you release it" type of controller (just like in Zelda BOTW)
I've done that for the run/sprint using a timer (before the last update ) but i guess it's a bit more complicated for the lock-on.
Any way to achieve please ?
|
|
|
Post by psixnox on Nov 20, 2019 19:31:42 GMT
found an answer?
|
|
|
Post by Invector on Nov 21, 2019 12:35:06 GMT
It's a fairly simple modification, just change the input methods to this:
if (lockOnInput.GetButtonDown() && !tpInput.cc.customAction) { // set the isLockingOn to true instead of = !isLockingOn isLockingOn = true; LockOn(isLockingOn); } // unlock the camera if the target is null // add the condition to reset the lockOn if you release the input else if (lockOnInput.GetButtonUp() && isLockingOn || isLockingOn && tpInput.tpCamera.lockTarget == null) { isLockingOn = false; LockOn(false); }
|
|