Forum rules - please read before posting.

Character->Animate on player

When I do character animate on a player and set the boolean, it never gets set in the animator parameters window (ie remains false) - is there any special you need to do for this? 

Comments

  • Shouldn't be  And Console message, and is your Player spawned at runtime or present in the scene file?

    Let's see the Action / ActionList (and location) that you're calling, as well as the Animator window.
  • edited May 2017
    OK (using 1.54c) , this image shows hotspot called hsTest has a use interaction called "test: use", you can see it says "AAAA" sets the boolean RSL_askQuestion to true then says "bbbb". I see both texts but the tick box for RSL_askQuestion is never set (if I manually set it by clicking the box in animator->parameters the player animates as expected). The player begins in the scene (and is assigned correctly in the AC game settings), has a player script with animation settings mecanim, manual. Nothing in console.


    Same if I tick "isPlayer" when setting the boolean ( https://dl.dropboxusercontent.com/u/4194619/Snap 2017-05-14 at 19.41.09.png )

    And same if I try with a 5 second wait after and set the interaction to run in background ( https://dl.dropboxusercontent.com/u/4194619/Snap 2017-05-14 at 19.44.41.png )
  • edited May 2017
    edit: wrote a little script in c# that can set the bools, that seems to work, so I guess its getting lost somewhere in ac, I may try locate where it happens and put some sys outs in.
  • Yeh cant work this one out at all, any tips?
  • ummm, what happens if you use Object:Animate instead? 

    Anyway, I'm not entirely aware what are the conditions AC uses to recognize the Player prefab as a character (specially if the player is hand placed in the scene). When I started doing VR and integrated AC to VRTK I had to do this weird dance with the player object's hierarchy, and then I noticed that my specific setup had made AC not able to detect my player as the Player, even if it was tagged as Player and had the Player script in it, so all the IsPlayer options in triggers and also in a few Actions just stopped working altogether (I had to switch my triggers to use Any Object with tag: "Player"). Maybe some option you are using in your player or the way you have set it up, like its hierarchy, may be getting in the way?
  • edited May 2017
    Im presuming "move speed float" should be "Forward" to match the ufps one ?

    Also I wonder if its because I have 2 characters under my player root object, theres a man and a woman, they both start on and then a script automaticly turns one off, so I can flip between them in game. I wonder does AC search for the first one or something? Maybe it is trying to access the wrong one, it would be good to know where I can stick a debug.log in to verify the name of the item its moving along, or maybe this is irrelevant. 
  • That is almost exactly it.

    AC makes an internal record of each character's Animator component, which it then affects when using the Character: Animate Action.  Your version assumes that it is on the root GameObject, but the most recent release allows you to assign it as a field in the Inspector.

    Regardless, you can get around it by following @Alverik's suggestion of using the Object: Animate and assigning the Animator component in the Action's field directly.
  • Great! I missed that suggestion and I did not even know about Object: Animate, it works!!! Wooo! Thanks so much, that is very cool to watch in ufps 3rd person mode, opens up a whole world of opportunities too. Thanks again for all the support, much appreciated. Also do you think this could be related to my other issue of not being able to move my person perhaps because of 2 animators? I will look into it. 

    So another case solved :)
  • I have just realised one flaw in using this way is that if I later change my player, I will have to manually reassign the animator any time I have used it.This could be one good reason to upgrade if the newer versions dont need this work around.
  • @radiantboy Well, I feel the way you are handling player switching right now isn't very optimal anyway... 

    Why not just use AC's player switching instead? You could have a Marker follow the player so that you can use that as the position for the new player when switching, and you can use the Active Inputs feature to run the actionlist that does the actual switching. Or if you want to program it yourself, you can take a look at the code in the Action that handles player switching to see how AC is doing it, you'll then just need to record the Vector3 position of the player right before the switch so you can assign it to the new player. 

    Though, I'm still unsure why you have the two players under the same parent, is it for debugging? like testing both players whenever you need? Or is the player going to be able to change players at anytime? If not, then just make a character selection screen when starting a new game, and just use the regular Player:Switch action. That'll save you a lot of trouble in the long run. 
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.