Look at

Slate Forums Support Look at

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #699
    elsie7ex
    Participant

    Hello,

    I just started to use cinematic sequencer and I’m trying to make an avatar to look at some place while is playing an animation.
    If I create an animator controller and use the mecanim track I can enable the IK pass and use the Look At IK. That works good, but I’m trying to use the new Animator Track instead the Mecanim Track. If I use the Animator Track I can’t make the avatar to look at the target I want.

    Is there any way to use Animator Track and Look At together?

    #703
    Gavalakis
    Keymaster

    Hello and welcome 🙂

    Animator IK’s are unfortunately only available by Unity when the animator component is using an Animator Controller, which is what the Mecanim Track is doing. The Animator Track though does not at all use an Animator Controller, but rather the new Unity’s “PlayableAPI” and as such IK features are simply non-existent, and the reason why “LookAtIK” action clip can not work with the Animator Track.

    Slate though, includes a simple alternative for that, the “Character/Head Look At” action clip, which can also work alongside with the Animator Track. For this clip to work though, you will need to attach the “Character” component on the actor gameobject and set the “Neck” and “Head” references accordingly.

    It is a simple Head Look At solution at the moment (No IKs involved)

    Let me know if it works for you.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #705
    elsie7ex
    Participant

    Thank you for your quick response.

    I’m trying to use the “Character/Head Look At” action clip. I’ve added the “Character” script to my avatar and I’ve linked the Neck and the Head and when I use the cinematic sequencer “Play button” it works good. However, when I click on Unity “Play buttons” the console displays the error:

    MissingReferenceException: The object of type ‘Character’ has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.Component.GetComponentsInChildren[Renderer] (Boolean includeInactive) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineComponentBindings.gen.cs:97)
    Slate.CharacterInspector.SetWireframeHidden (Boolean active) (at Assets/ParadoxNotion/SLATE Cinematic Sequencer/Characters/Editor/CharacterInspector.cs:34)
    Slate.CharacterInspector.OnDisable () (at Assets/ParadoxNotion/SLATE Cinematic Sequencer/Characters/Editor/CharacterInspector.cs:27)

    and when I press the cinematic sequencer play the avatar doesn’t look at the target.
    Am I still missing anything?

    PD: I attached 2 screenshots

    Attachments:
    You must be logged in to view attached files.
    #710
    Gavalakis
    Keymaster

    Hey,

    So. There are actually two different bugs here.
    To fix the null reference exception error although it is harmless, please open up CharacterInspector.cs and change method in line #33 to the following:

    Then, to fix the reason why the LookAt is not working in play mode, please open up AnimatorTrack.cs and change methods in line #195 to look like the following:

    The change above relevant to the original file, is basically where the ‘animator.enabled’ line appears.

    If you have any trouble with applying the changes above, just drop me an email (support@paradoxnotion.com) and I can send you the modified fixed files instead.

    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #715
    elsie7ex
    Participant

    Now works like a charm, thank you

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.