Hi, all!
Currently when I try to play animations on entities from the same mesh I get weird problems with messy distorted look. Single mesh is OK.
Two different meshes are OK, too. But two entities from the same mesh get messed up. It looks like animation states are shared on the same mesh. Is it possible to fix without mesh cloning?
@paroj please help!
Skeletal animation woes
-
slapin
- Bronze Sponsor

- Posts: 388
- Joined: Fri May 23, 2025 5:04 pm
- x 28
Skeletal animation woes
-
slapin
- Bronze Sponsor

- Posts: 388
- Joined: Fri May 23, 2025 5:04 pm
- x 28
Re: Skeletal animation woes
Looks like I need to duplicate skeleton and animations for it to work
-
slapin
- Bronze Sponsor

- Posts: 388
- Joined: Fri May 23, 2025 5:04 pm
- x 28
Re: Skeletal animation woes
Well, it looks like the culprit is trackListener I use for root motion, which is added to skeleton and not entity, so it will run each time for each entity on each skeleton. So it runs N times for each attempted playback of track so N times for each character.
However it doesn't know about entity it is running on and has no way to distingsuish it... Looks like it is a bug and can't be solved without patching...
-
slapin
- Bronze Sponsor

- Posts: 388
- Joined: Fri May 23, 2025 5:04 pm
- x 28
Re: Skeletal animation woes
can be solved by skeleton duplication though
-
chilly willy
- Halfling
- Posts: 82
- Joined: Tue Jun 02, 2020 4:11 am
- x 27
Re: Skeletal animation woes
Funny, I was looking at your root motion post a couple days ago and have been cleaning up some of my code to share with you and possibly contribute to OGRE. I'll respond to that there.
The AnimationTrack::Listener is only meant to override AnimationTrack as a data source and probably shouldn't have any other lasting side effects (like moving SceneNodes). There is no guarantee about when, why, or how many times per frame it will be called. If multiple Entities use the same Animation, the callback will be called multiple times per frame (with no way to tell which Entity it is for).