How do you get an arbitrary model to walk around with animation?
See original GitHub issueDemo 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:
function walkSheepToNewLocations(directions, delta) {
for (let i = 0; i < sEnv.num_sheep; i++) {
sheepModelInstances[i].setSequence(sheepWalkSeq, true) // using that boolean extra arg introduced in PR https://github.com/flowtsohg/mdx-m3-viewer/pull/69
sheepModelInstances[i].move([directions[i][0] * delta, directions[i][1] * delta, 0] )
}
}
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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:53 (25 by maintainers)
Top Results From Across the Web
How to animate a walk cycle in After Effects - YouTube
In this tutorial we'll be looking at making our character walk ! Get The "Lyric Video Creator Kit" Here: https://bit.ly/3lfC2AbWhat's ...
Read more >Entity Modeling and Animation | Microsoft Learn
Open the model and switch to the Animate tab in the top-right corner. Create a new animation in the Animations panel on the...
Read more >Create 3D graphics in Animate - Adobe Support
To move the object using the Property inspector, enter a value for X, Y, or Z in the 3D Position and View section...
Read more >Matplotlib animations the easy way - Brushing Up Science
This example walks through how to create the animation below in six steps. ... Well, it's not actually arbitrary, it's set up to...
Read more >Animating Arbitrary Objects via Deep Motion Transfer - arXiv
Given an input image with a target object and a driving video sequence depicting a moving object, our framework generates a video in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Pushed a bunch of changes I had stacking up over a long time, one of them is a simple example of how to add state to the units and doodads so you don’t have to do weird hacky things to not get the automated stand animations.
For example if you have your sheep in
map.units
, you can dosheep.state = WidgetState.WALK
(from widget.ts) and it won’t run the stand animations.It’s not much, but I finally get how to read stuff. No time to do with it anything for now though.
Maybe I’ll figure a nicer way to read strings… (not for tags since I’ll use u32 for those, but rather for actual strings)