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"

want to rotate character to pitch of camera

Ok, so the title probably isn't that clear, but basically I have a swimming character, and i have no problem swimming around in all 3 axes, however, when swimming up or down, the character moves in that direction, but does not rotate to match it. So it can swim upwards, but the character continues to face in a forward direction. This is probably something obvious, but these are my first few days working with Unreal :) here is my BP, it's just the standard 3rd person, but edited :) there is stuff off screen, but its not movement related, only adding a zoomable camera, but if a screen of that would be helpful i'll add that too :)

alt text

Product Version: Not Selected
Tags:
bp.jpg (645.7 kB)
more ▼

asked Dec 14 '14 at 08:42 AM in Blueprint Scripting

avatar image

toddy1991
62 6 7 11

avatar image Teodrus Feb 16 '15 at 06:15 PM

did you find a solution to this? I have the exact same problem.

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

1 answer: sort oldest

I just solved this for myself recently (wanted to have wow-like movement). Here are the rough steps:

  1. Get your actor's rotation (Get Actor Rotation)

  2. Get your camera's relative rotation (Camera Boom -> Get Relative Rotation)

  3. Add them (Vector + Vector) to get your camera's absolute rotation

  4. Set Actor Rotation to the result of #3

  5. Set camera's relative rotation to 0 (To get a vector of zero, you use Make Vector)

Hope this helps!

more ▼

answered Feb 16 '15 at 06:40 PM

avatar image

Lojo
60 2 2 7

avatar image Teodrus Feb 16 '15 at 10:31 PM

edit: this really helped! thank you very much! just need to restrict to some angle because it goes crazy from one point.

avatar image ederoliveira20 Jul 10 '15 at 06:20 AM

Could you please upload a pic of what you did? I tried following this but I get no results, I tried to use the 3rd person game gamera template, that is exactly what I want to do, and still got no results on the camera pitch

avatar image jtsmith Jul 10 '15 at 06:27 AM

Sounds like @Lojo solution will work. One thing I will mention though is it seems you are ignoring the "Roll" rotation of your character. Whether swimming or flying, roll gives you the somersault/back flip type movement of your character. Without manipulating that, your character will remain "flat". Good Luck!

(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