Forum rules - please read before posting.

Animator turning problem

edited September 2018 in Technical Q&A
Hello all,
I have a problem with turning animations. My character have animation controller with animations (idle, walk left, right, rotate left etc...).  When I rotate my character by button (rotate animation is playing) and click on interaction (look, use etc.) at the same time - Turning variable in animator controller freezes at 1.0/-1.0, so animation is looped until ActionList's end.

I'm wondering is it possible to stop all animations when clicking on hotspot?
I tried [Disable movement when Interaction menus are on?] and [Stop player moving when click Hotspot?] but that doesn't affect Turning parameter.

Any ideas?

Comments

  • What are your AC and Unity versions?  Let's also see your Settings Manager, Hotspot Inspector, and the Hotspot's Interaction ActionList.
  • AC is 1.63, Unity is 2018.2.1f1.
    Here is my settings:
    https://pasteboard.co/HDwBlmT.png

    I don't paste Hotspot settings becouse that bug affects all hotspots with interactions.
    All hotspot settings are similar: no marker, limit to gameCamera, always have interctive boundary. No difference if Single 'Use', Turn To Face etc.



  • I need to know why the character is moving/turning in the first place - is it due to the Hotspot Inspector, or the Interaction?  Please post the details I'm asking for - I cannot recreate the problem with what you've given.  Screenshots of your Player Inspector and Animator will also be of help.

    In a backup/duplicate project, also try the latest AC release.
  • edited September 2018
    Player is moving/turning due to WASD/Arrow buttons. When I click on Hotspot -> Use (for example) while rotating character by buttons, player loops in turning animation.

    I have separate animation when player turns in place (not moving, only turns).

    I searched settings for something like "Stop animations when player click on hotspot" but found nothing.

    This same thing occurs when player walks to trigger while character turns (Up+Left/Right arrow for example).

    Here are pics (Player anf random Hotspot Inspector and Animator):
    https://pasteboard.co/HDECKVB.png
  • edited September 2018
    I compared my settings with Default demo project, step by step, and the problem was in my Animator Controller setup and [Disable movement when interaction menus are on?] setting. If this option is enabled and Turning float is different than 0 when clicking on Hotspot, this parameter freezes at his last set value (so animator stops/loops at "Turning float " based state if outgoing transition condition also dependent on this parameter).

    Is it possible to enable only -1.0f/0/1.0f values when turning? Without interpolation?
    Something like binary system: click arrow - 1/1. Release arrow - 0.0f. 
  • You'd previously said that the option made no difference.  To be clear, is the "Turning" parameter only freezing when Interaction menus are showing?

    I can recreate the issue if the option is checked, and will address that.

    To enable only -1/0/+1 values, you can create a second "SnapTurning" parameter in your Animator, and attach a custom script to set it based on the regular Turning float parameter, i.e.:


  • edited September 2018
    I didin't notice the different earlier, sorry about that. : )

    Yes, with option enabled only "Turning" parameter is freezing. When you go straight ("Speed" parameter sets to 1.0f) and click on Hotspot, "Speed" sets to 0.0 instantly.

    Thanks for advice, I will try it.

    Cheers!
  • Recreated, will address in the next release - thanks for the details.
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.