Guiding the puppet's direction (cover system)
Is it possible to gently guide the puppet to walk, for example a straight line without totally preventing the player from walking to other directions? I'm not a huge fan of cover systems where the player gets sucked onto a wall and can't get released until pressing a button. The Last of Us, Tomb Raider and Metal Gear Solid 5 (for example) fixed this by letting the player get pulled against walls in a soft manner. The player can easily overcome the 'pulling' or 'gluing' force by pointing the analog stick away from the wall.
I've tried many methods like sucking the player onto a wall with a force applier. It's clear the gadget isn't designed for this sort of thing. It doesn't feel right and with too much force it throws the puppet along the direction of the wall. Using a mover without disabling the 'normal' walking controls gets kinda close, but sometimes the two inputs clash and weird things happen.
What sort of outputs and inputs should I use with the tag and the follower? Should I use the tag's yaw information? I can't figure out which input of the follower would do anything sensible with that data. It pretty much only has strength & damp inputs and a positional input. Currently my puppet can only run forward or backward on the Z axis depending on the orientation of the tag, even though I set both Y and Z axis to 100 % strength. I'm really missing something here.
The follower could be made to follow whichever axis you like of a given tag & the tag axis reference can be adjusted how you wish.
Detecting the correct stick direction to break cover could depend on how you keyframe the puppet once you enter cover.
Having a system like 4 laser scopes (forward, back left & right) on the puppet which activate in cover to detect which side the cover is on will help you determine which direction to push in order to break cover.
Doesn't the follower technique force you to only walk on either Y or Z axis? How would you use a tag for that? Also, how about detecting if the stick is facing the opposite direction of the cover? How would that work? Sorry if there were too many questions!
I built a simple cover system based on a 2D style system.
If you use a follower to force the puppet to follow a single axis (axis is defined by a tag) you can keep the puppet on any 2D plane at a set distance from your wall. (this was essential in my build to prevent a gun in the puppet hand from clipping into the wall)
The cover can be entered/exited via a button press once inside a trigger zone.
You could then also break cover by detecting the left stick facing in the opposite direction to the cover for a set period of time.
JimmyJules153 has a great tutorial on the 2D setup using a tag & follower found here https://youtu.be/uSAiaQMsQ1M
I did some testing. By using a force applier attached to the puppet I managed to PUSH the puppet to a wall pretty nicely. Unfortunately force appliers don't seem like very good solutions. They affect the puppet quite strong perpendicularly, but do little to prevent the puppet from getting detached from the wall by accidental diagonal walking. When you add enough of force to prevent this, the perpendicular force is already too high and hinders gameplay. I tried to place force appliers to both sides of the character rather than directly between him and the wall but it wasn't any better.
I decided to go for a more traditional style using a button to attach the character to the wall hard using a stronger force applier. Unfortunately this is really inconsistent. It works well 95 % of the time, but quite often the puppet randomly runs out of juice and becomes really slow or even stops. Don't even get me started on crossing >30 degree corners. I still need to experiment but it's starting to seem like this is not a very good tool for what I'm after.
Forces just need a *lot* of strength to affect the puppet. Turn up the strength and see if it works better.