Download

Changing Sidescroller Camera Rotation for In Game Effect

Hello everyone.

I am working on a project that is a 3d side scroller. What I am trying to accomplish is give the player the feel that they are walking around a city block. What I want to do is create an effect that when the player presses a button, it gives them the feel that they have turned the corner and are now on another street, while still being side scroller oriented. One of the suggestions that I have been given was to make it so that the world shifts 90 degrees instead of having the character turn.

My thought process would be to shift the SpringArm of the base character 90 degrees to cause this effect, effectively making it so that the character looks like they turned the corner. Or create a cinematic effect or an animation that makes the same thing happen? Any suggestion would be greatly appreciated.

Hello Rocky,

I have the same porblem while doing the similar project .
I can turn the character without any problem but the camera just won’t move.
Have you figer out any solutions yet ?
If you do could you please share with me?

This sounded like an interesting problem, so I gave it a quick go with a blank 3D sidescroller project.
For simplicity’s sake, I just added the corner rotation with a trigger instead of a button, but it should work just the same with a n action command.

Anyway, basic setup:

Simple Actor BP with a box collision.
On Begin Overlap, call a BPI to the character to rotate the camera.
(For my quick test, I didn’t check which direction the character should turn, but you can add that logic yourself…)

On the character, I stored the World Direction vector from the movement input as a variable, because we need to rotate this vector.
Also, if starting from the 3D sidescroller template, uncheck “constrain to plane” in the character movement.

When the rotate camera event is called, just run a few nodes to rotate the vector for the movement, and play a short timeline for a smooth camera transition, like this:

630967961d1c119fab1c549d336e5913bffc7b55.png
https://forums.unrealengine.com/core/image/gif;base64

If you spend more than a few minutes on this, you may want to improve the transition (e.g. play a “walk around corner” clip, check that the character isn’t currently jumping or whatever…)

The quick and dirty test looks like this: