Closed arcman7 closed 3 years ago
Okay, I understand now what you're saying regarding the fps. Thank you for the clarification there.
As for the animations, I noticed the model instances are having their animation sequence being reset by something; probably similar to what was happening here https://github.com/flowtsohg/mdx-m3-viewer/pull/69/files#
Did you revert any of that stuff? I don't see how I can set an animation sequence on a model instance and have it be preserved throughout the map update calls right now.
Look a couple of message up where I added WidgetState.IDLE
and WidgetState.WALK
:P
For example if you have your sheep in map.units, you can do sheep.state = WidgetState.WALK (from widget.ts) and it won't run the stand animations.
😅 Omg. I feel dumb. It's been too long! I'm just surprised I didn't immediately change my code to use those changes.
Demo video
You can see in this video, the sheep models just float from one location to the next without any sort of walking animation. The code that updates their positions looks like this:
What's weird is I never came across this issue when animating a single Grunt model walking. I would merely set the sequence to the walk value and then start calling
gruntModelInstance.move([delta_x, delta_y, 0])
.With the sheep it doesn't matter if I remove
sheepModelInstances[i].setSequence(sheepWalkSeq, true)
from the for-loop or not, they still just float around.