When I Set New Focus, the AI Instantly snap rotate to the focused location… Any Idea how to make it smoothly rotate to the new focused location?
Thank you in advance.
When I Set New Focus, the AI Instantly snap rotate to the focused location… Any Idea how to make it smoothly rotate to the new focused location?
Thank you in advance.
There is no built-in smooth rotation (not in the same way as SetFocus is working), but it’s not complex to implement:
Here is the good video about how to use this node: WTF Is? Interpolation - RInterp Node in Unreal Engine 4 - YouTube
The problem of not using SetFocus is that (And maybe I’m wrong, except for the last reason which I’ve tested a lot):
I’m thinking though of using RInterpTo/Ease before setting a new focus as a workaround, so for example when player shoot AI from behind the AI will first RInterp smoothly to player over Timeline, then after Timeline finishes I’ll set the new focus… I’m open for suggestions though if there is a better solution
SetFocus is also use per-tick updates for tracking. Though not sure about network solution, it still should work with manual rotation.
You can use SetFocus along with lerping target location if you want to (just update the focus per tick), but probably it will be heavier than setting manual rotation.
Another workaround is to make an invisible Actor for targeting, call SetFocus to this actor just once, and update it’s location smoothly as you want to.