Two questions, one about Animator Motion and one about Ability Start Location

Roverboef

New member
Hello! I'm working on a prototype in which the user can open a door, will automatically walk through, and then have the door close behind him.

My first question is in regard to the Animator Motion. No matter what I set the duration to on the script, it keeps resetting to 0 once I click play or even click on another file within my project. It also does not seem to "go off" once I start the Interact ability to which I assigned it, which I assume has to do with the duration of 0?

I've set it up in such a way that the player should move forward after a second or so after starting the ability. As far as I understand it, and by looking at examples in the Demo, this is what the Animator Motion is supposed to be used for. The Interact Ability is execute correctly however, and the door I Interact with plays its animation. So as far as I can see the Ability goes off correctly.

Now my second question is about the Ability Start Location. Whenever I start an Interaction, my character will very slowly rotate to the designated angle. How can I speed this up? I've searched on the forums, looked through the documentation and checked the Demo, but I cannot find the cause of this slow rotation.

Any help is greatly appreciated :)
 
My first question is in regard to the Animator Motion. No matter what I set the duration to on the script, it keeps resetting to 0 once I click play or even click on another file within my project. It also does not seem to "go off" once I start the Interact ability to which I assigned it, which I assume has to do with the duration of 0?
You're referring to the Animator Motion Scriptable Object, correct? I just created a new file and was able to change the duration successfully. Can you tell me how I can reproduce it resetting?

Now my second question is about the Ability Start Location. Whenever I start an Interaction, my character will very slowly rotate to the designated angle. How can I speed this up? I've searched on the forums, looked through the documentation and checked the Demo, but I cannot find the cause of this slow rotation.
The rotation speed is controlled by the UltimateCharacterController Rotation Motor speed variable. You can use the state system to increase this speed while the Move Towards ability is active.
 
You're referring to the Animator Motion Scriptable Object, correct? I just created a new file and was able to change the duration successfully. Can you tell me how I can reproduce it resetting?

I'm not sure how you can reproduce it, I'm creating the Scriptable Object by right clicking on my Project tab and going to "Create", then going to "Ultimate Character Controller" and clicking on the Animator Motion. I can change the Duration value but when I then click on something else in my project and click on the newly created Animator Motion, the Duration has a value of 0 again. This seems to happen with every Animator Motion that I create this way.

The "OpenDoorAnimatorMotion" Scriptable Object that comes with the UCC plugin doesn't have this problem. I'm using UCC version 2.1.9 in my project, with the InControl and FinalIK integrations.

As for the Rotation Motor speed, I'll follow your directions!
 
I'm not sure how you can reproduce it, I'm creating the Scriptable Object by right clicking on my Project tab and going to "Create", then going to "Ultimate Character Controller" and clicking on the Animator Motion. I can change the Duration value but when I then click on something else in my project and click on the newly created Animator Motion, the Duration has a value of 0 again. This seems to happen with every Animator Motion that I create this way.
There shouldn't be anything special about the asset included in the demo folder. I originally tried using Unity 2017.4 but I just tried 2019.3 and that worked as well for me. Can you copy the included animator motion and then make modifications to that?
 
There shouldn't be anything special about the asset included in the demo folder. I originally tried using Unity 2017.4 but I just tried 2019.3 and that worked as well for me. Can you copy the included animator motion and then make modifications to that?

Yes I can copy the "OpenDoorAnimatorMotion" and modify it but it suffers from the same problem. But somehow it does seem to remember the original Duration that I set although visually it is still set at 0. However when I then modify the Duration value again the Animation Curves start behaving very weirdly, warping and removing parts. I'm using Unity version 2019.3.0b11.
 
I also tried changing the value in the MoveTowards state, but no matter what I enter the Character still rotates very slowly when using the MoveTowards ability when Interacting with an Intractable that has the Ability Start Location component. The MoveTowards state is present on my Character and it's on top of the list, so it should overwrite the other states as far as I understand.
 
Yes I can copy the "OpenDoorAnimatorMotion" and modify it but it suffers from the same problem. But somehow it does seem to remember the original Duration that I set although visually it is still set at 0. However when I then modify the Duration value again the Animation Curves start behaving very weirdly, warping and removing parts. I'm using Unity version 2019.3.0b11.
I doubt this is it but try updating to the latest version of Unity to see if that helps. The AnimatorMotion asset has an inspector which displays the duration. This duration isn't a specific field that is set, it is instead retrieved from the curves. If you switch the inspector to Debug mode you can edit the raw curves. This will then allow you to make changes without that inspector script getting in the way.

I also tried changing the value in the MoveTowards state, but no matter what I enter the Character still rotates very slowly when using the MoveTowards ability when Interacting with an Intractable that has the Ability Start Location component. The MoveTowards state is present on my Character and it's on top of the list, so it should overwrite the other states as far as I understand.
Take a look at the demo scene for an example but if you click on the Ultimate Character Locomotion component and scroll to the bottom you'll see the Move Towards preset. You could actually use this exact preset to test as all it does is change the motor rotation speed. You need to ensure you are not using root motion rotation for this to work.
 
Alright, thanks for your help! I got it figured out now! The issue with the Duration value persists even on the latest version of Unity but I can work around that.
 
Top