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"

Camera not spawning with proper rotation

I am trying to spawn a camera for a top down game the camera spawns OK but doesn't have the correct rotation, it's not looking down at the character but forward.

here are some screenshots showing what I've done alt text

this is what the camera looks like in-game, it should be pitched forward by 90 degrees to look at the character below but isn't for some reason.

alt text alt text

That's the blueprint for the camera, it moves with the character on the x and y axis and hovers above it on the z, the set target function just sets the camera target variable. in the viewport the camera is facing downwards, which is why I am confused as to why it's facing forwards in-game.

alt text

this is where the camera actor is spawned by the character within the characters begin play event, the target variable is set here as well.

My question is how do I get the camera to face downwards?

And before anyone asks, No, I can't use a spring arm attached to the character because I want the character to rotate with the mouse and having the camera attached makes that go horribly wrong.

Product Version: UE 4.16
Tags:
screenshot005.jpg (249.7 kB)
screenshot003.jpg (181.5 kB)
screenshot002.jpg (216.7 kB)
screenshot004.jpg (215.1 kB)
more ▼

asked Jul 10 '17 at 10:57 AM in Blueprint Scripting

avatar image

MeGaJ0eY
34 6 11 16

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

1 answer: sort voted first

I'm not understand how it's work. You've create separate camera component in separate blueprint and want to use is for your character?

If player character doesn't have camera component, it will be created by player camera manager. I'm not sure that "SetNewTarget" should work in this case.

If you want to create some kind of separate camera, you must create new PlayerCameraManager class. Specify it in your default PlayerController class as default camera manager. Then in this manager you can override BlueprintUpdateCamera function and set camera's world transform there.

more ▼

answered Jul 10 '17 at 11:13 AM

avatar image

redbox
4.2k 80 17 103

(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