About multiple Animation

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
williamlai3a
Posts: 13
Joined: Wed Sep 19, 2007 11:57 am

About multiple Animation

Post by williamlai3a »

I have tried out the animators, and I found that each time only the newest added animator is active for the mesh to move.

eg: I first added a flystraight animator and then a rotation animator, the mesh will only rotate.

So, I want to ask how can I make the mesh move straight with keeping rotate?? And how can I create some self coded animator??

Thx a lot.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

As you've found irrlicht only supports one animator at a time on a node. If you want to have it flying and rotating then you need to code your own animator (as you've also noticed).

To do that you can look at the source for the two animators in question and then basically just integrate the code of the two animators into one animator by writing a class extending ISceneNodeAnimator.
Image Image Image
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Wasn't trying myself but may work:

Create empty node and attach it as parent of your node. Attach one animator to parent node ...probably flystrait one then attach rotate animator to node itself.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

I think this should probably be reported as a bug (or multiple bugs). It sucks that the built in animators don't play well with others, there's no real reason why they shouldn't work together, the system supports multiple animators... Link to tracker is directly below :D
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I thought that the problem with internal data was solved, didn't I remove the last class member in 1.3.1?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

oh :oops:
I haven't looked at this since I first started using Irrlicht
So is it possible to add a collision, fly circle, and rotation animator to make a character walk in a circle across the terrain?
Or flystraight, rotation and fly circle to make a loop-the-loop motion?

edit: oh you mean adding the same animator to multiple nodes?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Post by Ico »

Think it's about adding 2 or more animators to one node.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hmm, maybe you're right and the bugfixing was oly for using the same animator for several nodes. But then, are there any two animators which can be applied at the same time? Otherwise I'd expect a more general, conceptual problem somewhere.
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Post by Ico »

Never tried it ... fly + rotate, fly + delete, rotate + delete

Hm ... while thinking about it ... I'm somehow missing animators to scale and fade single nodes if I haven't missed something.
williamlai3a
Posts: 13
Joined: Wed Sep 19, 2007 11:57 am

Post by williamlai3a »

JP wrote:As you've found irrlicht only supports one animator at a time on a node. If you want to have it flying and rotating then you need to code your own animator (as you've also noticed).

To do that you can look at the source for the two animators in question and then basically just integrate the code of the two animators into one animator by writing a class extending ISceneNodeAnimator.
Yes, so I really need to do a new animator.
Can you tell me where ahould I add the API for editing the engine?
It seems I need to add some class named C........Animator and some ABC class, am I right?

Thx
Post Reply