For those wanting to see how an Automated Rotation 360 degrees Sentry works, you can download the files at:
Installation if needed:
Just extract in your project content folder.
You may need to redo the allocation of the meshes.
StaticMesh is SentryFoot
StaticMesh1 is SentryTurn
SentryGunActor child actor class is sentrygunactor
Gun is SentryGun
Basically what it does, it is it just stand still(ofcourse), while every 2.5sec(customization available) it gets a new Pitch for the sentry and Yaw for the rotation, and then moves to that rotation.
There were some issues i had to fix like Flipping and getting crazy weird rotations but those are fixed, if you do see an error or bug please tell me
Also in the blueprint i un-linked the looking at player when in range, you can just link that up again if you want that
It’s also fire-ready
The tick is disconnected because it’s the “follow player node”, so if you just plug that it’ll follow you on begin overlap
The Fire i disconnected as my firing thing went through walls and all, i have 0 clue how to make that, the sentrygunactor shoots from it’s front so that’s pre-set
Behind print string i had a spawn actor from class.
And the turning you have, did you change any of the random values? If they’re too high you’ll get flipping things, that’s the negative about move component to, it looks for the shortest road so that’s why i needed to keep it within margins.
The Blue ones should stay how they are, maybe a little bit of a difference but not major ones. The red ones also need to be 90, if that’s changed it can start to look weird.
Maybe record the problem you have? So i can see what exactly it’s doing?
Okay, update on this post, i’ve been looking/staring at my turret for the past few minutes and i noticed it kinda wiggle’s sometimes, but only when the turret is aiming upwards, can you confirm it’s only when it’s looking upwards?
EDIT: So i’ve tested with a lower amount of max-min ratio. the < float is put to -10 and the > float i put to 40. As i figured it already rotates in a 360 degree yaw value it doesn’t need to go over a 90 degrees pitch value, as it would just rotate in yaw to the direction. -10 is the value that will be the half-max pitch (downwards), now that max is -40., as it substracts a value between 10-30, it can go under the -10, but if it’s under -10 it will always go upwards on the next move to, same the other way around, max up turn then is 70, and the half-max is 40, if the pitch is above 40 it’ll always go down. If that makes any sense
The blueprint here is exactly as shown oo, all yaws is defined in 90 degrees, but with ours EventTick connected. Previously disconnected, such cannon is pointing upwards and not is following the pawn. And when connected follows the pawn but it is whirling crazily.
I see the same in my game if i connect it. For some reason it doesn’t clear the RotateF timer. That’s why it looks at you and turns away. Alright, so put the clear timer after the branch of Range after event tick on the true pin. Then connect clear timer to sequence. That fixed it for me.