question

Kari Payton avatar image
1 Like"
Kari Payton asked Kari Payton commented

Use animation to walk between network nodes.

I've loaded an animation from Mixamo on an operator. I wanted the operator to travel from node1 to node2 but in a crouching motion.

Is there a way I can use some type of a travel in process flow to make this happen? I don't want to get rid of the normal walking motion either.

FlexSim 18.0.1
animationsanimation creator
sidestep.png (417.7 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Kari Payton commented

You can use a Start Animation activity before the travel and then use the stopanimation() command after it.

travelanimation.fsm


push.gif (173.9 KiB)
travelanimation.fsm (26.5 KiB)
· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Kari Payton avatar image Kari Payton commented ·

@Matthew Gillespie thank you. One more thing, my operator is walking sideways. How can I rotate him to show the sideways movement. Right now it looks like he is sliding across the floor instead of taking sideways steps. I attached model with animation for reference. operator-travel-spray.fsm

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Kari Payton commented ·

The "Rifle Crouch Walk_Applying Glue.fbx" file didn't pack correctly into this model. (This looks like a bug; I'll add a case to the dev list.)

Please attach that file so that we can see what you are seeing.

0 Likes 0 ·
Kari Payton avatar image Kari Payton Phil BoBo ♦♦ commented ·

rifle-crouch-walk-applying-glue.fbx

Am I supposed to use the same character in flexsim that I downloaded the animation on? That may be the issue? Just guessing. @phil.bobo

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ commented ·

First, your animation is not "in place" so it will look funny when you apply it. He will appear to take a step, teleport back, take another step, teleport back, etc. To fix this, you want to download the animation with "In Place" checked:

Then, after you've applied that new animation file to your shape, you can turn the operator sideways during the animation by applying an offset to that animation file. This can't currently be done with the UI, but you can do it in the tree:

In MODEL:/Tools/AnimationClips, find the node for the animation file you loaded. Give that node object data, expand it, create an offsetrz node in its attributes, give that node number data, and set it to 90:

Then Build FlexScript to rebind the object's attributes and Reload Media so that the bone animation is then rotated 90 degrees along the Z axis when it runs that animation.

Then you will also want to change the Quick Properties for that particular animation so that it is Repeat Indefinitely and Travel-Distance Based like the Walk animation:

Then when you run it, he will walk sideways and animate appropriately:

You can adjust the duration of the animation clip to adjust for how long his steps are (so that he doesn't look like his feet are sliding):

0 Likes 0 ·
Kari Payton avatar image Kari Payton Phil BoBo ♦♦ commented ·

wow! thanks @phil.bobo

0 Likes 0 ·