Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: curb47 on July 07, 2020, 01:49:32 AM
-
HI everyone,
I'm looking for a way to convert/remap a rotational float value (90 to -90) to any user defined range.
I've got a Get Rotation of my character, and set a Float variable on the Y axis (Yrota).
If my character turns from facing Right to facing Left, then Yrota returns -90 through to 90. I'd like to use Yrota to drive another function, but need it to return 0 through to a positive number, 100 for example.
I've done a search on the forum and found a link for something called Float Remap, which sounds exactly like what I need to do, but it's old and the link is dead.
Can anybody help?
Thanks.
-
Hi,
it's on the Ecosystem browser: https://hutonggames.fogbugz.com/default.asp?W1181
Bye,
Jean
-
Thanks, yes, I literally just downloaded the Ecosystem thing and found it.
Thanks!
-
Hi,
cool :)
Bye,
Jean
-
Hi Jean,
Now I'm stumped. I can't see which variables to input into the Float Remap action.
If my rotation on Y returns 90 to -90, and I want to remap to 0 - 100, can you please explain which values to enter into:
Base Start
Base End
Target Start
Target End
Thank you. I'm trying to experiment with it, but I've been up all night and everything is blurry .
-
:)
I know the feeling, don't do that, it's better to work in sane volume and hours then push it to the limit and burn out.
So you want to remap a float ranging from [-90,90] to [0,100]
Base start is -90
Base end it 90
Target start is 0
Target end is 100.
Let me know how it goes.
Bye,
Jean
-
Thanks Jean,
That works perfectly!
Yeah, I need to take the foot off the accelerator and slow down a bit.
Thank again.
J.