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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Using finterpto to smooth rotation

Currently working with the flight template. Added this section to allow the camera to rotate left and right slightly when a yaw input is provided (similar to a neck rotating). Currently the camera jumps from the 0 value to the -15 or 15. Could anyone explain how I might smooth this out?

I can't seem to figure out how to implement the finterpto node into this script and properly smooth that camera rotation. Could it be that my exec connection for the camera's relative rotation is coming from that input yaw axis? Does this need to start at event begin play?

alt text

Product Version: UE 4.11
blueprint.png (218.4 kB)
more ▼

asked May 03 '16 at 03:48 PM in Blueprint Scripting

avatar image

1 2 3 6

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

1 answer: sort voted first

So, usually you lerp/interp two between two locations. The problem here is you have your logic via axis value, so you won't be able to just go between two locations. Instead of setting the rotation (to 15 or -15, which is how you have it set), why not AddRelativeRotation instead? You can also try out the RotationMovementComponent. But if you really do want that Set, you just need to watch that video in the beginning and it'll help you out!

  • If this helped, please upvote and mark as answered so we can close this out. Good luck!

more ▼

answered May 03 '16 at 03:55 PM

avatar image

2.4k 60 27 112

avatar image yoursham May 03 '16 at 04:03 PM

So the AddRelativeRotation node will add rotation and interpolate between the two points automatically?

I guess the section of your answer that confuses me is, why would I use location information to handle rotation of an object?

Sorry, new to blueprints, thanks for the references!

avatar image VictorBurgos May 03 '16 at 04:12 PM

Well, when I said location, I meant it as rotation as well. I guess I should have used transform instead. Regardless, AddRelativeRotation will rotate it however degrees you want. And keep doing it until you want to stop. Seeing how you were on input axis, that could work. But, you want the player to just press the stick to the left or right and they will roll from 0 to (-15/15). SetRelativeRotation will do that, if you just want them to tap it, but you might run into the problem if the player goes from left to right really fast. But anyway, watch the video, it explains how lerps/finterps work. You just need to put either of them before that Make Rotator and it will lerp it between those two points.

avatar image yoursham May 03 '16 at 04:17 PM

I'll give that a try, thanks for explaining.

avatar image VictorBurgos May 03 '16 at 04:17 PM

And to add to that. I forgot to mention Clamps! There are a few different ones in there, they basically do the same thing in the end, clamp values. So, What I would have done, instead of having this on inputaxis, I would put it as Action Maps, and then interp/lerp between the two positions. BUT, if you continue to use InputAxis, just clamp the values, addrotation, let the player control how far left or right they can roll. But that's just me!

avatar image yoursham May 03 '16 at 04:22 PM

Gotcha! I'll give that a try now.

avatar image VictorBurgos May 03 '16 at 05:29 PM

No problem!

(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