Object Tracking Blueprint - Rotation Offset Question

So I’m working on this film project where I have multiple cameras cutting back and forth from one another. In the center of said scene I then have this giant eye that tracks the position of the current active camera.

I have the automatic tracking aspect of the blueprint figured out and working, however I cannot seem to figure out how to add an offset that doesn’t consist of the actor just snapping into position, as opposed to rotating into position with an ease in ease out type of function.

How would one go about setting that aspect of this up? I’ve been trying to use a timeline in conjunction with a lerp or ease node to no success thus far. Any insight on how I might be able to achieve this would be greatly appreciated!

2024-05-17 11-02-40_1

Hey @ZackBerw!

That’s terrifying. :joy:

Okay, so you’re going to want to take it off of tick. Tick plus timelines really doesn’t go well, because it’s trying to fire every frame- I see you tried to use a Delay, but instead you can just use a timer and free up some resources!

You can use “SetTimerByEvent” and a custom Event, and start the timer on BeginPlay. Then it’ll run the function every time it completes, which would be a specified time on the Timer node. Then you can (If you want) use the output of it (called a “Handle”) and control that timer from different parts of your graph if needed.

Now for the actual easing. Part of your issue might be that you’re using “Play” instead of “Play from start”. Timelines keep their spot on the track when stopped or paused.

Switch those things out and let me know how it goes! :slight_smile:

Aha, thanks! Glad to hear it’s working as intended.
So unfortunately once I remove the Event Tick node it completely breaks everything and nothing tracks or follows the camera player anymore.

For the time being I took “Event Tick” off of the timeline node and just reconnected directly to the “Set Rotation” node. This then resorted the tracking not working at all when removed entirely.
Correct me if I’m wrong, but the “Event Tick” seems 100% necessary to the tracking functionality as once I start moving a camera around for instance, I would then want the eye to constantly track the newly generated position (thus needing to update the tick every frame).

As for the timeline side of things, I still can’t seem to get it to trigger a rotational movement. Especially when using the “Event BeginPlay” node, with the exception of one delayed snap into position at the beginning. Even then, it still doesn’t add any rotational movement to anything, just a sudden snap into position like when I was using the “Delay” node previously.
It’s almost like I need a trigger to be sent to the timeline when a player camera actor is switched instead of the “BeginPlay” node. But I’m currently not sure how to get Exec data for the timeline for that purpose with what I currently have.

I’m not sure what I’m doing wrong, as the logic you described makes sense to me on a fundamental level, but in practice I can’t seem to get it working yet unfortunately.
Thank you for taking the time to help though, I really appreciate it!

Ah, I see. Sorry for the wait, @ZackBerw!

So, timelines are extremely valuable for removing things from the processor, as tick fires once per frame, so 60x/second if FPS is 60. But it will work slower with lower framerates and faster with higher ones, which can cause those playing at higher framerates to experience issues if there is much on it. JUST this being on tick wouldn’t be an issue, but scalability is important.

Anyways, so a Timer needs a bound event. Then on start it will do the event, and it waits the “Time” variable in seconds (framerate independent) before executing it again. For this you’d want it to loop.

I made a mock-up and this is what I ended up with - you can get rid of a lot of nodes for better readability! :slight_smile:

The timeline has two keys with a time of 0.5.
Key 1: 0, 0
Key 2: .5, 1

1 Like

Why not just do an rinterp to on tick, without a timeline?

You know, that made me think for a bit and realize I may be thinking of the actor in an incorrect way.

My thought is, that to give it somewhat of a slower movement would be important to something larger and alive. Larger things have more inertia, and therefore require vastly more power and (unless there is no gravity or atmosphere) time to move.

But- this might not be @ZackBerw’s intention for the Actor. If it should always-always-ALWAYS be pointed directly at the player’s camera, then yes, an RinterpTo on tick would be good to use. I was thinking of it as something to avoid, an enemy to sneak around or something, when it could just be creepy set dressing like one of those paintings that are always looking at the viewer.

The timeline is for resetting current values, and causing increased/decreased adjustment speeds based on the actor’s current rotation. I didn’t suggest an RinterpTo because of the requested easing.

So your suggestion got the tracked rotation to finally work with the ease in ease out function! Now to just dial in the optimum timing given every other variable

But yeah, the idea was more akin to the creepy paintings that always stare at the viewer.
Thank you very much again for all the help, I really appreciate it!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.