Do AnimEventLister and AbstractControl interfere with each other?

It looks like you can work with animated models by implementing AnimEventListener just like the Hello Animation page demonstrates.

It looks like you can control spatials by implementing AbstractControl just like the Custom Control page describes.

I’m wondering if the two can/should be used to manage the same object/spatial. That is, something like:

// Pseudo-code
class MySpatialControl extends AbstractControl implements AnimEventListener {
    @Override
    void onAnimCycleDone(...) { ... }

    @Override
    void onAnimChange(...) { ... }

    @Override
    void controlUpdate(float tpf) {
        // TODO: What happens if we tell the model to start rotating *while* an
        // animation is playing?
    }
}

Here, what if I have code thats “playing” one of the model/spatial’s animations at the same time that the controlUpdate method is trying to force it to rotate. Will jME3 rotate and play the animation, or does one override the other?

You can use both without any problem. It will work the same way if you manage them separately.

Thanks @NemesisMate, so does that mean the spatial would rotate & play the animation?

yes, it should. The spatial transforms (scale, translation, rotation) are independent of the animations.