Hi Chris,
When the player character moves from Scene A to Scene B while the D-Pad is held down, the character doesn't continue moving upon appearing in Scene B. I have to release and press the D-Pad again to make the character move.
Is it possible to make the character keep moving seamlessly between scenes while the D-Pad is held?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What's your Project's Active Input Handling set to?
Keyboard or Controller
https://prnt.sc/oCBW157RlJtn
That's your Input method - I'm referring to the "Active Input Handling" field in your Project -> Player settings.
Oh sorry for that. My Active Input Handling is set to "Both"
Which one are you using, then? Are you relying on AC's Input System integration?
Yes, I'm relying on AC's Input System.
I can't reproduce such behaviour.
What are your AC/Unity versions, and how are you switching scene?
Does this occur with an ActionList that has a single Scene: Switch Action, and setting its When running property to Run In Background.
I'm using Unity 6000.2.7f2 and AC 1.82.1.
Yes, it's still occur even when I use a single Scene: Switch Action, and change its running property to Run In Background.
I use a 2d hotspot and the action is Scene: Switch with fade out to switch my scenes.
https://prnt.sc/FWCBlMfCvD5n
Does the Player need to "click" the Hotspot to interact with it? Does it interrupt the Player's movement by doing so?
Check to see if this occurs with a Trigger as well.
Yes, player needs to interact with the hotspot to trigger the Scene: Switch Action.
Does it interrupt the Player's movement by doing so?
Yes
Check to see if this occurs with a Trigger as well.
Yes, it occurs even when I use Triggers.
I'm sorry, I cannot recreate such behaviour at all.
In a backup / duplicate project, try the latest release.
Are there any other factors, such as custom scripts, at play that may affect behaviour?
The same issue occurred with my previous project, which was released in 2020. I believe the setup of my game may have caused this problem. If you don't mind investigating the issue, you already have access to my source code, which you can use to reproduce the issue. However, if it's too much trouble, feel free to ignore it.
Hi Chris,
I have an update regarding this issue. After conducting additional testing, I discovered that when using the keyboard, the character continues moving into the next scene but does not run. However, when using the controller, the character does not move at all. Could this be related to the input manager?
It's possible - if your Active Input Handling is set to Both, then both Input Manager and Input System will be able to affect input. If you're getting unwanted behaviour, try setting it to Input System so that Input Manager has no effect.
I switched from "both" to "Input System Package (New)" but unfortunately, it didn't fix the issue.
When you say the character does not move at all, is this at all, only after a scene transition, or only when inside a speciic scene?
With Input System, the controls are stored in the EventSystem prefab assigned in the Menu Manager, which AC will spawn in at runtime. Check that there aren't any instances of this inside the scene files that might prevent it from doing so.
When you say the character does not move at all, is this at all, only after a scene transition, or only when inside a specific scene?
Only after a scene transition. When the scene transitions, it starts with the character standing rather than walking or running, even though I'm still holding the D-Pad button.
With Input System, the controls are stored in the EventSystem prefab assigned in the Menu Manager, which AC will spawn in at runtime. Check that there aren't any instances of this inside the scene files that might prevent it from doing so.
I checked everything—I even created two new scenes to test it—and the issue still persists.
It's very frustrating because the keyboard works fine, and only the controller is affected by this issue.
That it works for keyboard suggests the issue may be on the Input System side, as it means AC is correctly reading the received input. Are you testing with the arrow keys, or WASD?
If you created a pair of new scenes to test the transition, try instead dropping the EventSystem prefab into the first scene and attach the Survive scene changes component. This will cause it to become scene-independent, and override the regular EventSystem spawning. Does that make any difference?
Hi Chris,
That it works for keyboard suggests the issue may be on the Input System side, as it means AC is correctly reading the received input. Are you testing with the arrow keys, or WASD?
Both.
If you created a pair of new scenes to test the transition, try instead dropping the EventSystem prefab into the first scene and attach the Survive scene changes component. This will cause it to become scene-independent, and override the regular EventSystem spawning. Does that make any difference?
Yes, it does. The controller is working. What do you believe was the cause?
I would also like the player to maintain their movement state. Currently, when I switch to the next scene while running, the character stops running and begins walking. I want this to remain consistent—running should persist as running, and walking should persist as walking.
Here are a few screenshots from the EventSystem prefab and the yellow errors I'm getting:
https://prnt.sc/WDg0-4lZ07hk
https://prnt.sc/lM3tM67jthm8
https://prnt.sc/LugxX8i1QRni
https://prnt.sc/EEIkq9w5dyAr
https://prnt.sc/AcxgVOsyZWKS
https://prnt.sc/weC4xiRDMMJh
The yellow warnings can be ignored - they're related to inputs AC can use but aren't defined.
Is the running issue limited to gamepad control, or keyboard as well?
Try changing the Run input action's "Action Type" to "Pass Through" to see if that makes a difference.
It seems to that Input System ignores input that's present at the time its initialised. Having the Input System be persistent across scenes gets around this, though it does look like this is a workaround to an issue with Input System itself.