Accurate Object Movement On A Plane Relative To Moving/Animated Camera

I’m creating an old school arcade shmup in the style of R-Type, Gradius, G-Darius, Ikaruga etc.

The game plays out in a 2.5D manner, where all the ships and bullets on screen happen on a 2D plane, but all of the objects are parented to the main game camera, which is being animated on a track that flies around the level, making for an interesting background.

My question is, if I’m animating the camera via the animator window, and I want all objects to stick to a 2D plane that’s parented to the game camera regardless of how it’s rotating etc., how would I do that?

The problem I’m having is I’m programming instructions for player movement to look at its current position, and update its position from its current position towards a vector that is calculated along its local forward axis (which means it’s calculated relative to the camera on a theoretical plane). When the camera is rotating wildly or quickly though, the ship steers off center, and ends up in a weird position depth wise, and sometimes at a strange rotation because of some out of sync timing with how the animator is updating the camera position.

I’m pretty sure it’s because the ship is checking where it is and calculating its next movement, and when it updates the movement on the next frame, the camera is simultaneously moving itself, so the ship has maybe moved forward in a straight line, but the camera has slightly rotated since.

My big question = When does the animator update itself?

I’ve animated the camera with unity’s built in animator, when does it update the position with the new keyframe? Is it during early update, normal update, late update? Somewhere in between? The next question would be, where should I place my movement code to update the ship’s position, to ensure it calculates and applies movement AFTER the camera has moved to its newest keyframe via the animator?

Do these two links help?

Animator component - Update mode