I’m trying to figure out how to make it so when the player goes to an edge where two walls intersect (or where a wall ends) upon right-clicking and holding it, the camera will lean and the fov will zoom in; when the player moves in a separate direction/jumps, it would revert to normal (or to player settings, but that’s a can of worms I’ve been slowly working at). There is no player model, and idk if there will ever be; as such I am not worried about animations.
I’ve acquired more knowledge over prototyping, and I could deduce that it requires line-tracing (to make sure that there is ‘air’ for the player to lean into) and some camera trickery to do the effect. (or even a non-rendered bone to act as a spline)
Many thanks.
So what I would do is have a left scene node and a right scene node, both slightly lower than your camera, and maybe 100 units from the middle of the actor.
Then, when the right mouse button is pressed, do three line traces-
One from center mass 50 in the X,
One from the left scene node for 100 X,
and one for the right scene node for 100 X.
If the Center HITS, continue to left line trace, if left line trace hits (meaning there is wall there) do nothing and do right line trace, and if that hits, do nothing.
If Center = HIT, and either left or right do NOT hit,
Rotate camera to angle left or right, and lerp to the appropriate scene node’s position.
On right click release, just lerp to the original camera rotation (not Z, just X and Y) and the original camera position.
Hey so what was proposed worked perfectly; now I am trying to figure out the best method of moving/rotating the camera.
I’ve experimented with several methods, including forcing my Camera Roll Component to adhere to a pseduo-velocity to trick it (which is the base movement) but can’t seem to find the best method. (May just need more trials with the component)