Getting Rotation Speed Using Rinterp To.

Hi there,

I need to be able to get a float of a blueprints rotation speed ideally a range of 0-100 (this is flexible) to affect a RTPC parameter in Wwise that will control the pitch of a rotate sound. I have made (using a tutorial) a very basic turret that tracks the player, ive used a Rinterp to affect the rotation. Ive tried subtracting the targets current YAW from the target YAW and vice versa to no success! Im unsure if im using the right values! Ive attached a screenshot of what ive done in the blueprint, the post event at location is from wwise and spawns the sound the set RTPCvalue node is what i need the float number to go into. Apologies if im using the wrong techniques im just a sound designer aha!

Thanks for your help!

Or is there a method for working out how fast a number is moving, say take a number then 1 second later take that number again and work out the difference to give you how fast that number is moving per second?

Hi,

Well there are different ways to find that out. Can use a delta rotator based out of tick comparing past rotation, or a more simple way that could work for you would be to use angular velocity. Get the components angular velocity you are using, split struct the vector, then you use either x,y,z depending on what values you want. You will get a positive and negative value depending on rotation, so create a float curve and manage the pitch as 0 as ‘origo’ with curves to both positive and negative sides. Use the float from the angular velocity to drive the curve and you are done. Hope that helps.

Hi,

Just come across this post, sorry to dig it up again been having a similar problem trying to drive an RTPC using the rotation of the UE security camera asset
Tried following the instructions in the answer but i’m not a programmer just a sound designer as well.
I’ve created the angular velocity node which goes through a break vector so that i can drive the rtpc with the camera rotation, just not sure where to execute it in my blueprint or how to drive the curve i have created with the float from the break vector.

Now I’m gonna answer on the top of my head, based out of a quick look at your setup. In your case, you seem to be panning the camera using a timeline and lerp. Since you are using a lerp, your Scan Rotation goes from 0 - 1, (and you don’t actually need a tick in your case, just use the update in the timeline and some altered node, but your choice) use those values to create a curvefloat that you have created in your content browser. If you don’t know how, here is a tutorial: WTF Is? Curves in Unreal Engine 4 ( UE4 ) - YouTube

Create your pitch curve based out of 0 to 1 (the curve in the timeline will detemine the speed it takes to go from 0 to 1) make that curve so that it matches your wanted pitch-values. Since you are using play from start, it will be from 0 - 1, if you use reverse it, it will be from 1 to 0. When you are done with your curvefloat, create a curvefloat variable in your blueprint, add the curve you have created as a reference. Drag it out and get the float curve value based out of your Alpha (in your case scan rotation). Now you will get a pitch-value based out of the curve you have created from 0 to 1, based out of the speed of the timeline. Hook that in to whatever you want that will need the pitch altered based out of rotation.

This is a hasty response but I would only use a timeline for what you are doing, not include a tick.

You can also just draw the same curve in the timeline, just make sure they are the same length

Hi, thanks for the response, your instructions were easy to follow.

So I have set up my curve float which matches my timeline values and length. I’ve added the curve float variable into my BP that references the curve I made. I’ve got the variable going into a get float value node with the scan rotation alpha from the timeline and the return value is going in to my set RTPC node but is not taking effect. I must be missing something.

My RTPC pitch control values in Wwise are now set between 0 and 1 as well.

The x value in your curve should be from 0 - 1 and the y value should be the desired pitch value.

If i remember correctly Wwise is using cents as pitch measure (pitch modulator, voice pitch etc), a range from 2400 to -2400 making 0 default. So in this case 1200 is 2x, making a shift from 0 - 1 pretty much not noticable. Could be wrong as well, don’t use wwise. Anyways, try out what i said and hook up a print string to your float value so that you can see that you get the right values.

Ok thanks for your help, Using wwise the y values of the curve just need to be the same values that I set for my RTPC the pitch are set values using the RTPC graph. I’ve got the values printing to screen but it doesn’t follow my timeline exactly and is not affecting the pitch still, I’ll try working the rest out from here though. Thanks