Forum rules - please read before posting.

Possible bug: player stops walking sometimes

Hi there, I am using Unity 5.3.1 and AC 1.51B. I checked the bug fixes for AC Version C and D but I can't find this one in the notes.

So I created a big 6 minute during cutscene. In this scene(s) are different NPC's and a player prefab that is spawned and switched (I have three players in the AC settings).  An important thing to notice is that the Camera is set to 3D in the AC settings BUT in one scene I use a 2.5D camera created with AC which btw works fine with the 3D settings on. 

Now to the point: when I play the cutscene, in scene number 5 (the 2.5D scene) my npc works fine, he walks to the right marker, does his dialog but THEN gets STUCK. I hear the footstepsounds but he isn't walking anymore. There is no way as far as I can see that I did something wrong in the ActionList. I just use the same actions as I always use. Here comes the strange thing: if I restart the scene. no problem! He walks fine, also after his dialog. So I figured this must be a bug. The same thing happened one time with my player in this same scene, just out of nowhere getting stuck. If I restart the whole cutscene again: no problem, it works.

Yesterday I made a build of the project and the same problem persists: The npc stops walking in cutscene nr. 5. When I restart the cutscene it does work. 

So, I hope @ChrisIceBox knows something about this. I think the problem might be that I use an ActionList in OnStart where I call another Cutscene from but I am not sure. The actions itself are what I have always used so that can't be the problem I think.


«1

Comments

  • I would prefer to be the judge of that - please post the Action(s) in question.  Does it work if:
    1. You run the Cutscene that contains the Action manually (as opposed to letting it run indirectly from OnStart)?
    2. You remove the speech Action?
    3. You open the Scene window when the freeze occurs?
    You will also need to provide details of your game's NavMesh, and how your characters are set up.
  • The problem is I can only try it out after I restart Unity, because the second time I restart the cutscene there is no problem only when I run it for the first time, so it takes some time to test this


    1. Ok, instead of calling the Onstart Cutscene that runs this particular cutscene in the onstart field of AC, I run this particular cutscene directly from the onstart field of AC. Restarted Unity and now there is no problem! So the problem must be clearly in my OnStart Cutscene that runs all other particular cutscenes.

    I will make a screenshot now and share it here. I will test the other possibilities right away.
  • edited April 2016
    So this is the Main Cutscene OnStart the regulates the other cutscenes. image



  • If you are running multiple ActionLists at once, make sure that the movement Action is not being cancelled by another that's running at the same time.
  • And here the complete first Cutscene that is the first cutscene I run from the OnStart Cutscene, Action 11 is where the player gets stuck if loaded for the first time (if loaded this actionlist from the OnStart actionList):

    image
    image
  • 2. If I remove the speech Action and play the cutscene again like normally from OnStart and after restarting Unity it also works!


  • edited April 2016
    Strange, this failure of walking doesn't seem to come back anymore at this moment, also not after restarting. As far as I can see there are no multiple walk Actions running at the same time in different Actionlists. There are only two walk actions in one Action list seperately running after one another. Strange... 

    Is it possible that changing the AC OnStart field sort of refreshes the actions? I can't think of another reason at this moment.
  • 3. Can't give the answer at this moment on that since its working fine untill now, I can't even recreate the problem anymore! 

    Navmesh: Unity navigation.
    Characters: Mecanim 

    I don't know if this information is suficient enough though, maybe you need screenshots from the navmesh and the characters inspector?
  • edited April 2016
    Something I also did was edit the ActionLists and reorganise them (they where a mess inside the Actionlist Editor). Maybe that had also something to do with it? (I am sorry to write so much, I just would like to track down what the problem was because it seems to be solved, also for others).
  • That's only likely going to have an effect if the Cutscene itself is quite old.  I too would like to track down the source, but if it's now behaving I don't think we'll be able to recreate the issue.  Let me know if this pops up again.
  • edited April 2016
    I think after all, it had something to do with Cinema Director. Apparently I still had run the cinema Director Cutscene at the same time (in this particular scene). This itself doesn't have to be a problem BUT I had the character in question also assigned to the "character group" of the  Director. When I deleted the whole cutscene from the scene, build the game again, close Unity, the problem was definately gone. However, I think this shouldn't be conflicting, I didn't even have an action in the Cinema Cutscene Director. 

    PS: One more thing: I said I solved it in my last message yesterday, but apparently that wasn't the case because the problem came back again when I closed Unity and run the Game Build. I still had the cutscene of Cinema Director on back then. So deleting the Director Cutscene seemed to really solve it.
  • edited April 2016
    EDIT: the problem came back when I placed a sound: play music action in between Action 1 and 2 of the Main actionlist (the OnStart Actionlist). When I removed it, problem gone. So perhaps, indeed not related to Cinema Director but to my own Action in AC.
  • That your character's footsteps still play is telling - are they assigned in your NPC's Inspector, or are they playing as some kind of custom Animation Event inside your Animator controller?  Are you using root motion for your character?  If so, any change if you uncheck it?

  • edited April 2016
    To be clear on the subject: my own action only scales the character. There is no custom footstep script on the NPC character that gets stuck. There is one on my main character though  that is in this same scene (but invisible), however,I don't see how that can be related. 

    Apply rootmotion is always checked on any character I have but I don't use root motion turning in the Player script or in this NPC script and if I leave off Apply Rootmotion my character can't walk. It will take me some time to make him walk without rootmotion.

    EDIT: Just did another test and the same problem happened again. I then got back to Unity refreshed my actionlist, close unity, run the build again and the problem for the npc is gone. But when I play the game and then play the whole cutscene again the problem doesn't show up at the npc but at the player! Also in the same scene! My player has indeed a custom foorstepscript but I don't see how this can cause it. 
  • I'm not suggesting that you don't rely on root motion entirely from now on - but it's important to know if that's what's causing it.

    Neither am I suggesting that the custom footstep script is to blame.  What I'm trying to work out is if the character script is behaving as though the character is moving, just not visibly so.  If the character relies only on AC's own footstep sound playback, and it is playing, then it suggests the character believes itself to be moving.

    Rather than amending your character to not use root motion, place down the Brain NPC from the 3D Demo game (found in /Assets/AdventureCreator/Demo/NPCs), and amend the Actions to control him instead.  Does the issue continue?
  • I just replaced the npc with Brain, of course, not yet something wrong yet because it seems to happen randomly and not very often anyway, so I need to have patience but if it goes wrong after I builded the game again or in the Editor I will report it immediately! 

    Some things to notice that I didn't mention earlier:

    - My original npc and player have both Final IK components, one biped IK rig and a Grounder (to detect ground (for the feet) collision) script.

    - I use the Switch player setting in AC, that means that after 2 scenes, I switch the Main Player to another player. The scene that I switch the Player in is also the scene where the stop walking phenomenon occures. So I figured this might be related.


  • Hi Chris, I did the cutscene test with Brain as the player, aswell as the npc in the particular scene where it goes wrong from time to time, both in the editor aswell as in the final build. Untill now (I closed Unity, opened the .exe, played the cutscene 3 times, closed the executable again and did the same process all over) Brain didn't seem to have the same problem as my own characters that are both driven by mecanim. So I can probably say that 99,9 procent the problem is with my own characters (I made a lot of tests with my own characters and then I discovered while it went without problem at first, later on it went wrong again). 

    But after all, I also made tests with the mecanim characters and disabled all the Final IK scripts, together with the footstep script. Sadly, here the problem persists. So this one is kind of hard on me! 
  • (I meant hard FOR me, sorry)
  • The inspector of the NPC:

    image
    image

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.