I have a simple box that moves using Matinee. If I create a camera and set that camera’s transform to the box’s transform on EventTick, the camera view jitters. I would expect/like it to lock directly onto the box. I’ve tried to use the “Add Tick Prerequisite Actor” to make the camera tick after the box, but that doesn’t help. I’ve found that if I use the “Attach Actor to Actor” function, it actually locks directly on. Is that the only way to do this?
Hey max_chen-
Using the EventTick call will reattach the camera to your box on every frame. If the camera is also being created at the same time then it is recreated and reattached continually. Your best best is to use the “Attach actor to actor” as you are.
Cheers
Thanks , Just so I understand what’s going on in my case, is it because the camera’s position is being updated first and then the box? I started stepping through and it appears that the ALevelScriptActor is setting the camera position and then AMatineeActor is setting the box position. So, it’s a frame behind. Is there no way to change the ordering between these two? In any event, I’ll start looking to see if I can replace my work with “Attach actor to actor”.
Yeah, I probably could but there’s some more calculations that I have that make the camera not always a fixed distance. This was all based on thinking that I could update the camera transform in what I thought is a generic way. I’ll keep going with the “Attach actor to actor” function for now.
Though I’m not sure how your box and camera are setup, but could you add a camera component to a spring arm attached to the box? Then the camera would always be a fixed distance from the box as the box updates and you would only need to update the box.