#this code is going to keep running, no

1 messages · Page 1 of 1 (latest)

still finch
#

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

heavy wharf
#

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?

still finch
#

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

heavy wharf
#

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

earnest vale
#

you are not using your playerinput with the sendmessages mode

#

you aren't using the playerinput for receiving input at all

heavy wharf
#

The safest bet here would be:

_playerInput.actions.Disable();```
earnest vale
#

so nothing you do to the PlayerInput directly stops you from getting input

heavy wharf
#

or _playerInput.actions.FindActionMap["Player"].Disable();

still finch
#

I am not doing any custom tooling though ? That confuses me. i am using the input as unity intended?

heavy wharf
#

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

earnest vale
heavy wharf
#

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

still finch
#

interesting.. I am able to switch maps just fine.

#

Give me 2 seconds. let me pull something up

earnest vale
#

you aren't using the playerinput to actually receive input

heavy wharf
#

what happens if you do _playerInput.actions.FindActionMap["Player"].Disable();

#

or _playerInput.actions.Disable();

earnest vale
#

you're only using the playerinput to choose action maps at this point

still finch
#

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)

still finch
earnest vale
still finch
earnest vale
#

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

still finch
#

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!