Change camera animation on Trigger

Hey Everyone,

I was wondering if anyone could point me in the right direction here. I currently have the Side Scrolling template loaded in UE4. I’m trying to make it so that when the player steps into a trigger volume, the camera and player rotate 90 degrees and go along a different path (and axis).

I think the best approach would be to set up a Trigger Volume (Blueprint) and Camera (Blueprint). So when the player steps into the trigger the “current” camera is switched to the blueprint camera (which completes an animation of the camera moving 90 degrees).

I hope this makes sense and please let me know if I’m not being clear enough.

Thanks for reading!

Depending on the effect you could rotate your main character with a set camera inside of that blueprint at a certain distance from the main character.

It certainly could look cool and you can get rid of the “old” level in the background (the 90° one) and prevent overlaps by loading / unloading those parts of the level exactly when you enter that volume or otherwise trigger the rotation.

I didn’t work with the locked axis yet but it should be able to be changed in runtime. Have you tried searching “Set” inside of your character BP? One of the nodes displayed in the context menu should contain what you’re searching for.

If not give me a heads up and I’ll look if I can find anything tomorrow (won’t be back on my PC today) :wink:

Edit: Aw my bad. It’s currently not possible to change the locked axis. It will most likely be added in 4.6.

Sorry for that. You could work in the meantime with simply adding movement input in the direction you want. It will allow you to test though it will probably break a few times by the character flying out of the way.

Though if you can hold on till 4.6 you can add it easily. Or you do it via C++ or add the code from the guy in this post. He already created something like this via C++ and I believe he made the node.

Hey Erasio,

That’s the other approach I was thinking (and currently trying to do). I’ve been searching for the appropriate node for ages. I set up a Camera Animation sequence and was trying to set the camera to follow that sequence when the trigger occurs but I can’t see anything like “Play Animation” or “Set Animation”.

However I think what you’re specifically referring to is “Set World Location” and “Set World Rotation”?

Yes indeed.

More of the “Set World Rotation”. A consistent rotation can be achieved by using the Vinterp node which will output a point between a defined startpoint and a defined endpoint closer to the endpoint by “Speed” which you can define as well.

You could also use a timeline. An animation is more for the character itself or scripted events.