I’ve done 8+ Hours of research and no one knows how to make this cover system, I’ve seen some not so pretty looking cover systems where they’re procedurally generating the valid cover spots and it auto attaches your character to the wall. So I’m thinking I’m going to have to do it the long tedious way, here is my idea.
There would be “bounding boxes/collision boxes” (BB/CB) along all the walls and valid cover points that your PlayerController (PC) can run into then a little bit of text shows up saying “Press C to get into cover.” then when the player inputs the command ‘C’ it calls an animation to slide you into cover and simultaneously zooms your camera out.
Pseudo Code (Sort of):
if {
PC collides with BB;
print text “Press ‘C’ for cover”;
}
then {
Slide Animation (SA);
Camera Zoom (CZ);
}
if else{
CC != BB;
return 0;
}
I am not a experienced coder but couldn’t you do something kind of like about to where if the PlayerController collides with the BoundBoxes then It calls and animation and play that animation.