#this code is going to keep running, no
1 messages · Page 1 of 1 (latest)
Okay so now I am a tad confused. Disabling input means no hardware gets read correct? SO no input.
The reference is stored for the inputV2 class
but your FixedUpdate is still running.
Can you explain more precisely what you mean by you are still moving?
Like you have full input control?
correct. I have full input controll . via keybaord and via gamepad when I trigger the disableInput.
I confirmed it fires the correct methods, and that the method itself is correct
So for more context .
You have the unity input system hooked into the PlayerInputV2 class.
The class is given to the ThirdPersonController for all input.
So that is why I am super confused. yes the values are not going to me zero or magically null, but if there is NO input coming from the hardware then it does not matter right ?
Unless I am making the incorrect assumption
You're using this DeactivateInput function but is does your PlayerInput component actually have the action map you expect as the "current action map"?
I guess I'm kinda confused why you're using the PlayerInput component when you went out of your way to do all of this custom tooling
at this point I would probably be using the generated C# class and managing my own Action Asset instance manually
you are not using your playerinput with the sendmessages mode
you aren't using the playerinput for receiving input at all
The safest bet here would be:
_playerInput.actions.Disable();```
so nothing you do to the PlayerInput directly stops you from getting input
or _playerInput.actions.FindActionMap["Player"].Disable();
I am not doing any custom tooling though ? That confuses me. i am using the input as unity intended?
You're kind of hoping and praying right now that the "current action map" which is an internal concept for PlayerInput is actually the "Player" map, which is not guaranteed
you aren't using the PlayerInput as intended, no.
You are bypassing the PlayerInput component's primary features and using the action asset itself more or less.
That's why i feel like you should just abandon PlayerInput, it's doing nothing for you here other than being a holder for your action asset instance
and confusing you when you try to use its currentActionMap property or its .enabled
interesting.. I am able to switch maps just fine.
Give me 2 seconds. let me pull something up
you aren't using the playerinput to actually receive input
what happens if you do _playerInput.actions.FindActionMap["Player"].Disable();
or _playerInput.actions.Disable();
Let me try these .
you're only using the playerinput to choose action maps at this point
Man, I really thought I had a grip on this whole input thing .
This worked '_playerInput.actions.Disable();'
@earnest vale Do you perhaps mind explaing how I should use the player Input. You are correct in saying that I am using it to switch maps currently, but how else would I manage things things like hold actions, tap actions if not via events directly how I am doing it.
Always happy to learn and to fix my mistakes. (You don't know what you don't know)
Your suggestion worked. Now I need to fix the way I am using the playerInput .
there's quite a few ways to use the input system, and it's not super uncommon to see people inadvertantly doing double the work by accidentally mixing them, so you aren't alone lol
ive listed them before, give me a sec
Thanks. I felt like I went through a InputSystem Arc and I re-wrote my input system 3 times. This is the only way I found to get what I want to work
regarding hold and tap inputs, there are interactions you can set in the inputactionsasset, then you would use the phase (started/performed/canceled) to determine what to do
with SendMessages, you would get a message with an InputValue for isPressed for press & release interactions (performed -> pressed, canceled -> released), and iirc otherwise you only get the message when the action is performed
these internals aren't documented super well, i had to check the source code for these, so i might be off. i'll have to check again
I appreciate your time both of you! I got a solution but now I think I will re-write my input system to try make thigs simpler XD.
Thanks again!