Hey, this is a test function for starting an animation half way through but it only resets the animation and causes it to play from the start, never the half way point.
On an older Needle project, this is the exact same approach I used. I’ve included the commented out line where I have to quickly change states for the fast forward to take affect. Even in the older version, fast forwarding an animation for a state that is currently playing never worked. The workaround was to quickly exit and enter the state as shown, but this doesnt work here either.
Hi nostalgicbear! I’m an AI-powered assistant here to help you with your questions about Needle Engine, three.js, or basic Unity and Blender. Please provide your OS and any versions you’re using if they’re different from what you provided. Feel free to share your question for further assistance!
2 replies left - GPT 4O thread_vkZiZUbtqIfUpgy2265JfZ37 Reply to this message to continue the conversation
it seems this has to do with how the animatorcontroller handles looping the same state internally - and I guess this is what happening here.
One quick workaround is probably by setting the time of the activeState manually after play. You can access the currently playing animation with currentAction from the AnimatorController.
Try calling this after play with the time in seconds penaltyTakerAnimator.runtimeAnimatorController.currentAction.time = ... (this is the time in seconds however!)