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 do I reset controller yaw and pitch?

I'm making a TP FP switch similar to Skyrim, but when I got back to FP the camera lerps using a timeline to the position and rotation of an ArrowComponent which is parented to the Root, and the camera gets parented to this arrow. The only difference from TP movement is that it directly gets the control rotation instead of dividing it up. Same mouse controls, only one change in the camera settings.

So it works and it rotates the camera to the same rotation of that arrow, but it seems to "pop" into the rotation of the controller, so if you move the camera while the blending happens you get the popping. What is the best way to get the rotation of the control yaw and pitch or how to reset it/lock it for one second?

Or better how would you make sure the camera gets blended and attached correctly so it don't pop after the camera blend anim has been performed which takes 1 second for now?

Right now I'm doing this when you switch from and to FP: http://pastebin.com/640EepWQ

And here is the blend animations plus some extra: http://pastebin.com/yUwJiJvA

Product Version: Not Selected
Tags:
more ▼

asked Jul 05 '14 at 05:00 PM in Blueprint Scripting

avatar image

fanzypantz
377 32 42 63

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

2 answers: sort voted first

So what I did instead was to get the control rotation and lerp to that rotation value and at the same time rotate the character capsule only in yaw to wards the same rotation. making a smooth transition in the direction the camera is facing in third person. No popping, or turning, it faces the same way during the transition ^^

I'm doing it this way because after one second standing still, the person can turn the camera around the character without the character following. So if I turned the camera to look at his face and go into First Person, he will turn around 180 degrees to face the same way.

more ▼

answered Jul 06 '14 at 04:00 PM

avatar image

fanzypantz
377 32 42 63

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

Hello!

When I doubt: branch. Coming from C# (where I usually had 90% of my scripts be if-statements), didn't take long before I realized their power.

Attach all your camera controls so, that you have variable "lockRot", and if its 0, condition of those branches from input is checked, and the signal can pass through adjusting the camera.

Hope this helps, -DoctorPC

more ▼

answered Jul 06 '14 at 03:10 PM

avatar image

DoctorPC
398 44 39 51

avatar image fanzypantz Jul 06 '14 at 03:55 PM

Oh icic, well I did it another way that I think worked better than resetting the yaw and pitch.

avatar image DoctorPC Jul 06 '14 at 04:26 PM

nice! :) Hope your project proceed nicely.

(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