x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to smoothly transition cameras during possession

Hello there, I have been looking through the help sections for awhile, trying to find a way to make a smooth transition during 3rd-person character switching.

The idea is: when the controlled character dies or is destroyed, the camera travels/flies to another pawn/character in the level.

The 'set view target with blend' seems pretty viable option to me, but I can't figure out how to get it working (I can't figure out how to make a reference to the camera I want to blend to). Any help or alternate suggestions would be appreciated.

Product Version: UE 4.19
Tags:
more ▼

asked Mar 20 '18 at 01:15 PM in Blueprint Scripting

avatar image

Tomendayo
1 1 2 3

avatar image AyanMiru Mar 21 '18 at 04:33 AM

To get reference to Camera, you can get reference to the Pawn/Char with that camera and get the camera component out of it. Does it help?

avatar image Tomendayo Mar 21 '18 at 08:26 AM

Thanks for responding. I was eventually able to get view target with blend working when I added a camera actor to the scene. Now, I have to figure out if i can get it working with the follow camera in my character blueprint. I am able to make a reference to the follow camera, but when I try to plug it into the 'new view target', it says 'camera component reference is not compatible with actor reference'. Maybe I have my blueprints set up wrong? alt text

This is what i have so far. P.S. this is in Level Blueprint

capture.jpg (56.8 kB)
avatar image Q-tro Mar 21 '18 at 08:44 AM

Set View Target with Blend takes an Actor with a Camera Component as New View Target. If you have a Pawn with a camera component that you want to transition to, you should pass that as the New View Target. (in your case is the Magic Character BP, I suppose) .

This should result in the expected behaviour, although it can be hard to have a nice visual result using Set View Target with Blend if the position of the view target is not fixed.

If you want to have a smooth cinematic camera transition between two dinamic points, maybe the best approach could be a timeline that updates your camera position, following a spline, or some targetPoints calculated from a NavMesh (to avoid going through walls and obstacles during the transition). This requires a litlle bit more work though.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Thanks for the hints guys. I realized that the problem was:

The camera switch was happening at the same time as the possession. So, I added a delay for the possession so that there was time to blend the cameras before the player controller started looking through the camera that I wanted to blend to.

The issue lay in the fact that the possession would cause the other camera to be used before there was even a chance to blend to it.

Solved, here's the screenshot alt text

Thanks

capture.jpg (113.6 kB)
more ▼

answered Mar 21 '18 at 09:57 AM

avatar image

Tomendayo
1 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question