playMaker

Author Topic: Float Remap[SOLVED]  (Read 1844 times)

curb47

  • Sr. Member
  • ****
  • Posts: 256
Float Remap[SOLVED]
« 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.

« Last Edit: July 07, 2020, 02:07:18 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Float Remap
« Reply #1 on: July 07, 2020, 01:54:37 AM »
Hi,

 it's on the Ecosystem browser: https://hutonggames.fogbugz.com/default.asp?W1181

Bye,

 Jean

curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: Float Remap
« Reply #2 on: July 07, 2020, 01:59:40 AM »
Thanks, yes, I literally just downloaded the Ecosystem thing and found it.

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Float Remap[SOLVED]
« Reply #3 on: July 07, 2020, 02:07:29 AM »
Hi,

 cool :)

Bye,

 Jean

curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: Float Remap[SOLVED]
« Reply #4 on: July 07, 2020, 02:15:43 AM »
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  .

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Float Remap[SOLVED]
« Reply #5 on: July 07, 2020, 02:24:58 AM »
:)

 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

curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: Float Remap[SOLVED]
« Reply #6 on: July 07, 2020, 10:48:48 AM »
Thanks Jean,
That works perfectly!

Yeah, I need to take the foot off the accelerator and slow down a bit.

Thank again.

J.