I have a bunch of cannons the lerp to and from a rotation, when doing this the entire game loses a metric ton of frames, is there any more efficient ways of doing this without lerping every single event tick or is there something better than lerp as once is starts it never fully reaches its end goal and just continues lerping into smaller and smaller decimals.
TL;DR any way to make several lerps any more efficient or is there any other way to actively change between lerped rotations of several objects
Second half^ (continues at white arrow on the left)
What im plannin to potentially do as well is to make it so that the first 6 in the array/set of the cannons do the rotation and the rest follows suit with set rotation but i dont know if it changes anythin optimisation wise
so basically the cannons are managed by a middeck blueprint that adjusts the rotation of all the cannons through scroll wheel input and then smoothly rotates towards the desired cannon fire width to then shoot cannonballs, depending on how close to centre of the ship a cannon will rotate only a set amount through a function called ration calculator (the closer to centre the less od the rotation target it will have)
This is the average amount of cannons we expect players to have (the same amount on the other side)
mouse button clicks to fire each respective side
the player is able to actively change their desired width of the cannon at any time depending on the situation if there are several enemies for spread fire or just one for on powerful concentrated shot
the only thing that the cannon blueprint should manage is whether or not to fire to keep it simple
yee no worries the timeline addition did improve the performance post cannon rotation, but when it is actually rotating the game does not enjoy existence XD
the cannons are made with the Add Child Actor Component that then is placed into a child actor set corresponding to which side it is on (Right and Left)
do you think simply having the lerp occurring on the bottom row only and then having the rest of cannons on subsequent levels just follow the rotation of the cannons on the bottom row using set rotation?
Ok, blueprints and event dispatchers is the way ( or one anyway ). I can rotate a whole ship side of cannons towards a target point without any frame hit whatsoever:
There is an actor BP in the scene, which tells the cannons where to aim. Right now, I’m just aiming at the origin: