Hi.
Currently I’m experimenting with Cocos2d-x and Box2d. I found a problem concerning the priority of Action Manager in relation to other sub-systems.
I’ve got the main layer which has the ‘update’ method, which in turn invokes PhysicsSystem::Update. Some physical nodes should shake on collision with each other. This is done via actions. But it appears that actions are performed at the very beginning of each frame, before any other scheduled functions. Thus each frame I shake the nodes and then call PhysicsSystem::Update which naturally overwrites the transformations done by actions.
Now here are two questions:
Why the heck actions have the highest priority? Isn’t it conceptually wrong? Why aren’t actions performed after all scheduled functions?
How to fix this issue without hacking Cocos2dx, since it can open Pandora’s box and cause new problems?
It seems this problem can be solved by using custom Action Manager with the lowest priority.
Anyway, any thoughts concerning this subject are still welcome.
Concerning suggested priorities of SpriteKit, I think that actions should be performed after the physics simulation. Moreover, maybe physics simulation should be the first in this list. In my first message I’ve described the scenario when your order won’t work properly.