Search Unity

【Look Animator】- Realistic look at target animation for your models!

Discussion in 'Assets and Asset Store' started by FimpossibleCreations, Sep 28, 2018.

  1. ShervinM

    ShervinM

    Joined:
    Sep 16, 2017
    Posts:
    67
    Hi @FimpossibleGames !

    We just updated to v.1.0.91, and trying to make a build results in the following two compiler errors:

    Assets/FImpossible Games/Look Animator/FLookAnimator.cs(15,88): error CS0246: The type or namespace name `IFHierarchyIcon' could not be found. Are you missing an assembly reference?

    Assets/FImpossible Games/FBasic Assets/Editor Tools/FPropDrawers_MinMaxSlider.cs(68,5): error CS0246: The type or namespace name `BackgroundColorAttribute' could not be found. Are you missing an assembly reference?

    Is there an assembly definition file missing for the Editor Tools? Otherwise the Slider script above doesn't have any if defines blocking out the editor code.

    Thanks for you help!
     
  2. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    That's strange, I am doing build without troubles, but I see newest fBasicAssets is causing trouble with build.
    I will update it as soon as possible, maybe you updated not only Look Animator?
     
  3. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    If you guys have some suggestions to the package, what more could be included, please share your ideas here.
    My task list for version 1.1.0 seems to be a bit too short :rolleyes:
     
    Last edited: Sep 24, 2019
  4. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    209
    I know its a different asset, but I Would like a "grab & pull" feature for the jiggle asset. (And if possible for the tail as well)
     
    Last edited: Sep 24, 2019
  5. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Thanks, I think it may be possible to look nice with tail animator when I finish some new stuff in it.
     
  6. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    Hello,

    I just bought your marvelous look animator along with the Spine & Tail animator because I love your Eye animator so much. :)
    I was wondering if there is a way to activate the look animator only from a distance range. Basically I have a character passing in front of the camera (the target) but I don't want the character to look at the camera from the beginning of my unity timeline.

    Thanks for the support.
     
  7. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Thanks Netpost!
    The fastest way for this custom need is defining new variable, for example above LateUpdate() inside FTailAnimator.cs (line ~815) like

    Code (CSharp):
    1. float MinimumDistance = 0f;
    And replace code from line ~855 to ~855 with some more stuff: https://pastebin.com/8anV2LFu
    Then inside inspector click "Draw Default Inspector" and on the bottom there should be variable "Minimum Distance" set it to value from which character should look at target ;) (but then you can't use "Max Distance" it must be set to 0)

    If you have more questions or something is not clear feel free to ask.
     
  8. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    Hi and Thanks for the quick reply. Forgot to mention, I am not a programmer. :confused:
    Could I just activate look animator from the unity timeline? Perhaps I can check if this can be done with playmaker without programming. I will investigate on this.

    Thanks again.
     
  9. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Updated to version 1.1.1
    ● Added "Nodding Transition" animation feature to add some movement to head when starting looking at new targets giving much more life, but try to not overdo it
    ● There was some cleaning up in code and speed of animation when changing target can be different than in previous versions, make sure to update your "Change Target Speed" variable
    ● Added possibility to cull component calculations when choosed mesh stops being visible in camera view (OptimizeWithMesh inside "Optional Parameters")
    ● Added possibility to freeze head rotation when loosing target to follow (can be helpful when doing custom blending fade animations) variable 'NoTargetHeadStops'


    https://imgur.com/a/3UbShxP
     
    ProtoPottyGames likes this.
  10. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    Hey those are some great sounding additions! The slight nodding is something that I never would have thought of.
     
  11. vegasanx

    vegasanx

    Joined:
    Apr 7, 2019
    Posts:
    31
    Is there a way to keep the Look Animator going while the game is paused?
    Also: I updated to the latest version of Look Animator and now the player is looking up when they run and is doing some weird head movements in some other animation states. Any idea why this is happening or do you have a link to a site where I can download old versions?
     
    Last edited: Apr 5, 2020
  12. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    You mean when you use Time.scale = 0?
    Then you would need to replace all Time.deltaTime and Time.smoothDeltaTime to Time.unscaledDeltaTime
    inside FLookAnimator.cs but I will make option to enable it in next update for look animator.

    Can you mail me with video clip of what is going on? Are you sure you didn't change anything when updating package?
    When you turn off "Animate with source" it is still happening? If yes then probably wrong bone is assigned as head, or you were using other "Fixing Preset" (under "Correcting Rotations" tab)
     
  13. vegasanx

    vegasanx

    Joined:
    Apr 7, 2019
    Posts:
    31
    Ok thanks, much appreciated.
    The "Fixing Preset" was set to Parental which I thought was the default but changing it to Full Manual fixed the issue. I didn't change any settings after updating and turning off Animate source caused some other odd head behavior but I'm glad it's back to normal now.
     
  14. FcsVorfeed

    FcsVorfeed

    Joined:
    Aug 15, 2014
    Posts:
    50
    I upgrade the new vision , it looks too many bug, strange head Angle, strange twist, wrong Angle of empty target, the head cannot play the animation correctly when playing other animations, etc

    I just want back to 1.0.9, but i can not find any where to download
     
  15. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Can you mail me clip with the bugs? We will try to solve it here.
     
  16. psychicsoftware

    psychicsoftware

    Joined:
    Jul 11, 2012
    Posts:
    17
    Hey, great work with this, I love it! I'm occasionally seeing a problem though, which it seems (from discussion above) like you fixed previously but it's still happening sometimes to me (latest version, just downloaded yesterday). This is when SetLookTarget(null) is called: the character is still trying to look at something (I think it might be 0,0,0). In the inspector it does have a null value for ObjectToFollow.
     
  17. psychicsoftware

    psychicsoftware

    Joined:
    Jul 11, 2012
    Posts:
    17
    any update on my problem? it's still happening.
     
  18. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    I am working from few days on refactoring Look Animator, soon I will come to state in which I will take care of that ;)
     
  19. psychicsoftware

    psychicsoftware

    Joined:
    Jul 11, 2012
    Posts:
    17
    Hi, any update on the problem?
    Here's a character being affected by it (object to follow is null):



    And when I disable F Look Animator:

     
  20. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Yeah I am constantly working on new version from above month :confused:
    Almost everything is coded from scratch and there are multiple new features.
    It will be probably marked as version 2.0.0 I will submit it next week for review, it is almost done.

    If "Blend To Original" goes to value = 1 it looks the same like with disabled Look Animator or different?
     
  21. psychicsoftware

    psychicsoftware

    Joined:
    Jul 11, 2012
    Posts:
    17
    The same.
    That gives an easy work-around anyway.
     
    Last edited: Jul 10, 2020
  22. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Look Animator V2.0.0 RELEASED

    ! Warning ! To make update be proceed without any errors, please remove directory 'Look Animator' from project and import new version again

    If you was using backbones rotation offsets in corrections tab, you probably will need to adjust it in new version, as well as some rotation speed parameters etc.

    - Refreshed GUI and UI images to fit better with new unity versions and different skin versions

    - Now tabs inside inspector window will be much better categorized and easier to work with

    - Added support for languages (just inspector titles to give a hint, not all variables) English, Polish, Russian (translator - t), Japanese (t), Chinese (t), Korean (t)

    - FLookAnimatorWEyes.cs is removed, instead of two components eyes functionality is built in main component and available to turn on under new tab "Additional Features"

    - Big change if you was using code to modify look animator, "Blend To Original" changed name to "Look Animator Amount" and is working in reversed way, 0: No Look Animator Motion 1: Full Look Animator Motion (You can still use BlendToOriginal through code but it is marked as obsolete and will be removed in next versions )

    - Many variables changed name in new version, they are marked as obsolete, if you was using them in your code please replace them with new naming

    - Upgraded Gizmos on scene view with many new controls to better understand parameters

    - Added slider for "Compensate Positions"
    - Now you can easily replace "Back bones" with drag & drop other bones onto list
    - Scripts managed into partial classes, full code reworked, better optimized and improved
    - Upgraded 'Max Distance' feature with new parameters
    - Added possibility to correct rotation of each bone in chain
    - Now you can adjust Back Bones count in playmode
    - Added possibility to set custom weight values on BackBones (Enable Curve -> Toggle on the right)

    - Backbones weights falloff now have advanced settings, you can adjust its values when character is looking on target which is far behind him

    - Animation frames without baked keyframes will be detected and fixed automatically (you can disable automatic detection with 'DetectZeroKeyframes' toggle)

    - Now looking animation is using SmoothDamp transition, meaning rotation speed is accelerating then decelerating instead of starting fast and then slowing down (you can go back to this style with 'AnimationStyle' parameter under '"Additional Modules" Motion Settings')

    - Added elastic start look range feature
    - Added max rotation speed parameter
    - Added many small parameters which will help solve many custom behaviour conditions
    - Upgraded and fixed a lot of smaller features
    - Added many new small features to easily design needed behaviour for look animation
    - Simplified bird mode

    Now I am recording release video for V2.0.0 and universal tutorial video showcasing most of the possibilities in new version.

    If someone have script errors when using other my packages with new look animator, go to "FPD_Header.cs" file (in .../Editor/Property Drawers/...) and rename "FD_HR" for "FPD_Header", fix update is under review
     
    Last edited: Jul 14, 2020
  23. Cileb

    Cileb

    Joined:
    Feb 20, 2018
    Posts:
    6
    Hi.

    I imported the latest version of Look Animator into a new project today. I have been trying to build but it fails because of this one error:

    Assets/FImpossible Creations/Look Animator/Scripts/LookAnimator.Misc.cs(22,13): error CS0103: The name 'OnValidate' does not exist in the current context​

    Any ideas how I can fix this?
     
  24. Cileb

    Cileb

    Joined:
    Feb 20, 2018
    Posts:
    6
    This is funny. I somehow managed to fix my problem.

    I took a look at the code and added
    #if UNITY_EDITOR ... #endif
    on lines 16-24 of LookAnimator.Misc.cs. Building works again and Unity isn't throwing any more errors, I'm just not sure if this was a proper fix as I'm a beginner at scripting. Is this okay to do / it won't break anything?
     
  25. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Yes it will be enough, I submitted fixing update for review.
    Unfortunately I did not notice this method, my bad :confused:
     
  26. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @FimpossibleCreations firstly, great asset! Easy to configure, adjust, and use.

    One question I have for you is whether there is a public method somewhere that allows you to enable and disable the controller (without actually disabling component so the head doesn't snap)?
     
  27. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Thanks! and yes there is lookAnimator.SwitchLooking(true/false, timeOfTransition);
    (remember that you need to have using FIMSpace.FLook; on the top of your .cs file)
    It's linear transition, in next version I will make version with ease blending transition.
     
    local306 likes this.
  28. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    Thank you for the reply. I will give this a shot!
     
  29. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @FimpossibleCreations so the one script I am linking it to is using a Unity Event, but for whatever reason it doesn't seem to show options for methods inside of the other partial classes. Have you any experience with this?

    Otherwise, I can just write a wrapper class to capture the events and relay with the FLookAnimation script.
     
  30. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    That's probably because more than one argument in method and unsupported types to view inside inspector window, try pasting this somewhere in FLookAnimator body:

    Code (CSharp):
    1.         public void SwitchLooking(bool enable = true)
    2.         {
    3.             SwitchLooking(enable, 0.5f /* How long transition should take*/);
    4.         }
    And it should be visible in event handler.
     
    local306 likes this.
  31. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    I just uploaded new tutorial video explaining most of the features for Look Animator:

     
    Willbkool_FPCS likes this.
  32. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @FimpossibleCreations

    Great Video! I see you added a new "maximum distance" along with many other improvements. This will be really usefull. "Look Animator" was already amazing but it is getting better and better. Thanks for this great update!
     
    FimpossibleCreations likes this.
  33. ninadpradhan

    ninadpradhan

    Joined:
    May 9, 2018
    Posts:
    9
    Im having an issue, although it works on a computer with game scene, when deployed on phone (IPhone 11 Pro max), the look animator doesn't do anything, it simply doesn't work, can you please help. Let us know what do you need from us to debug this issue. FYI its in AR Scene not game scene
     
  34. ninadpradhan

    ninadpradhan

    Joined:
    May 9, 2018
    Posts:
    9
    Just had to uncheck start after t-pose and it started working.
     
  35. Half_Res

    Half_Res

    Joined:
    Apr 16, 2013
    Posts:
    12
    This is agreat look-aim solution. Is it also able to aim other bones - so hand, arm for an NPC blended pistol aim towards the player?
     
  36. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    350
    Hi,

    I have a script that lets me follow a game object via transform.position = target.position; in LateUpdate(). I use this to let an object follow a bone of my character. This works fine with a normal Animator, but with Look Animator naturally this doesn't work correctly anymore. What could I do in this case? Parenting the object to the bone is not possible.
     
  37. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    It can but it's not dedicated for that, but soon in next updates I will provide Inverse Kinematics option which will do this job much better.

    You can switch "Follow mode" in "Tweaking" tab to "Follow just position" and set it through code by
    LookAnimator.FollowOffset (when mode is 'Follow just position' then FollowOffset is world position to follow)
     
  38. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    The latest update (in v2) has a small bug in FGUI_Finders.cs line 102: if (animator) return animation.transform;

    My guess is it's "return animator.transform", and not animation.
     
  39. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Thanks, I submitted fixing update.
    Copy paste is a curse.
     
  40. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    It was easy to fix. Btw, I'm getting "Animator not found" even if the animator is in the GO or any child.
     
    Last edited: Sep 11, 2020
  41. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    350
    Maybe I didn't explain clear enough what I meant.

    In my case I have an object (a sword) that follows a bone in a certain way (the character's hand). Because I don't want to parent the sword to the character's hand bone, I have a script that lets the sword follow the bone in LateUpdate(), which works fine without LookAnimator. But with LookAnimator the bone gets moved after LateUpdate() apparently, so my script uses the wrong position somehow.

    In any case, changing the Follow mode did not help in this case.

    EDIT: I think just setting the [DefaultExecutionOrder] to a high value helps. I will ask again if I notice other problems.
     
    Last edited: Sep 14, 2020
  42. KonekoSoft

    KonekoSoft

    Joined:
    Aug 16, 2020
    Posts:
    4
    Hi,
    Does this asset support "Look multi objects in a scene". If it can, how to do it?
    eg: I want Player walks near the Picture Frame in the wall, and look it. Then, Player walks near the "Computer Monitor" at the corner of the room, and look it, and so on...

    From what I saw, there is only one "Object to follow (Target)" mean Player can see only one object in a scene. It can useful for NPCs look at a single Player, but if Player looks at multi NPCs or objects, it can't.
     
  43. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    This stuff you have to code by yourself, package offers methods which can help managing few targets without finally loosing main one. There are example scenes which are showing example implementation of that.

    PAckage contains example of NPCs looking at each other and looking at player when he goes nearer, example of player focusing on objects when going near them and example of entering area with multiple look targets to prioritize and look on nearest one etc.
     
  44. abdo400

    abdo400

    Joined:
    Feb 12, 2016
    Posts:
    44
    Hey,
    Does this offer full body rotation after reaching max torso rotation?
    We are looking for changing body rotation (or feet) after reaching max torso rotation limit for the character
     
  45. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Rotating whole character nicely would need things which are not inside Look Animator package.
    Such thing you would need to code and animate by yourself, but you can use some of Look Animator variables to detect moment in which character should rotate like lookAnimator.GetLookAngles().y or lookAnimator.GetCurrentLookState()
     
  46. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I just got this, real nice! However, I need the character to look at the player -- but the character prefab isn't in the scene initially, it's instantiated as a prefab, so I can't assign anything to the Object to Follow field. Is there a way to do that on the fly, or assign the object on the Player layer or something like that?

    thanks!
     
  47. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    540
    Please check demo scenes and scripts ;)
    You can easily assign object to follow when you get reference to FLookAnimator with lines like look.SetLookTarget(target); or look.ObjectToFollow = target; etc.
     
    gecko likes this.
  48. Schagg

    Schagg

    Joined:
    Dec 15, 2018
    Posts:
    6
    [Solved]
    Hi, I just bought your plugin and am generally very happy with the purchase. I encounter a weird problem though.
    When I instantiate the character the Look Animator is attached to, the character looks to the target with a weird offset. Any hint on what to look at?

    To clarify: The character target for the Look Animator is the main camera. Everything works perfectly, like it should if I have the character in the scene from the beginning. But if the scene is empty from the beginning and I instantiate the character later, the character looks off to the right and down.

    Sorry for the fuzz! The containing object I instantiated was scaled, which probably messed with the angles...
     
    Last edited: Oct 23, 2020
  49. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Just finished my latest project, a classical music video called "By the Brook". Used your asset on some of the animals to great effect!
    Thought I'd share it with everyone. This was developed throughout the pandemic as a form of relaxation.The music and scene were started in February when everything was getting shut down. The music (composed by my wife) was finalized in late September and the scene was finally completed this week.
    The goal was to take a few minutes and relax and let all of the world's trouble pass you by and just have a few minutes of peace before you have to get back to reality. I hope you enjoy the escape.
     
    orangetech likes this.
  50. gagasik

    gagasik

    Joined:
    Jul 29, 2019
    Posts:
    25
    Hi Guys,

    First off all thanks a lot. Awesome product.

    I have the following problem.

    When my character is in the some pose, it looks right, but when the pose changed (for example it sits from the stand pose), the head rotation is starting look not right. So is there any method to refresh all calculations after changing the pose?
     
    Last edited: Nov 5, 2020