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 can I specify which camera to use in a Pawn Blueprint?

Hello everyone.

I am currently doing a project as part of my Uni course and have had a bit of a struggle with the use of the cameras in the Pawn Blueprint. I understand it has a default camera but from what I have read it should be overridden when you place a new camera component?

My issue is this, I have four cameras in the pawn blueprint that will be controlled by the user in VR. As you can see from the images, it is a car interior with three cameras for the mirrors and one for the user. When I view the project in the preview or VR/mobile preview it generally uses the Pawns default camera, but sometimes it chooses one of the three mirror cameras at random (that should not be accessed), but never the named 'VRCamera'.

alt text

When I package this to my mobile, it seemingly always picks one of the 'mirror' cameras at random each time I package it. But not the VRCamera or the Pawns default camera. I have been searching the web/forums and trying different methods for a week now and am at my wits end. I have placed the VRCamera above the car to show more clearly that it is not being used.

alt text alt text

If it makes any difference, whenever I do anything on the level the camera the Pawn is using changes. For example, it kept using the immobile rear-view mirror camera when I previewed the level, but after I placed a completely unrelated blueprint into the level, it started using the wing-mirror camera, even adding meshes into the scene can cause it to change the camera used by the pawn, really odd.

Thank you in advance for any help or advice you are able to provide! I really appreciate it.

Product Version: UE 4.18
Tags:
more ▼

asked Dec 10 '17 at 12:18 AM in Blueprint Scripting

avatar image

luke-brocky
3 1 1 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Read this to understand how view target work in UE4:

https://answers.unrealengine.com/questions/366967/change-view-on-clicked-object.html

So activate and deactivate camera component to select which camera is used or do code in C++ change camera selection routine in CalcCamera.

more ▼

answered Dec 10 '17 at 04:16 AM

avatar image

Shadowriver
33.9k 916 164 1093

(comments are locked)
10|2000 characters needed characters left
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