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"

get the camera rotation from character in a different blueprint

Hi Guys,

I want to use the camera rotation for my aiming of a weapon.

But i have weapon fire etc. in the weapon blueprint, and i dont know how i can acces the camera rotation from there. When i turn context sensitive off, i can get the camera, but " target(self) " seems to be not allowed and i dont know where to get it from.

Can Someone just say how i can get the camera rotation in a different Blueprint?

Product Version: UE 4.11
more ▼

asked Apr 25 '16 at 12:38 AM in Blueprint Scripting

avatar image

0 1 3 7

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

1 answer: sort voted first

Have you tried Get player pawn, and get forward vector from that? This should give you the forward vector of the player character's camera.

The only difference is that the camera may be less restricted that the controller's rotation. You may have to get the player pawn, cast it to your player character class and then get the camera's forward vector.

Hope this helps :)

more ▼

answered Apr 25 '16 at 02:03 AM

avatar image

1.8k 66 27 90

avatar image Zerzuskan Apr 25 '16 at 11:57 AM

No, that doesnt help, sorry.

When i get the forward vector, i do not have a rotation, but a location. However, i tried out to get the actor rotation from player pawn and the projectile spawned.

The Projectile moves in the direction the player is facing, but that is not what, i want. I want it to be like in the first person template. that i can also look and and down and stuff.

avatar image keyle Apr 25 '16 at 12:47 PM

So player rotation it is. There is a property to use controller rotation, if it's not set you may not get the up down.

alt text

avatar image Zerzuskan Apr 26 '16 at 01:04 PM

Thank you, that helped very much.

Have a nice day !

(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