playMaker

Author Topic: Perlin Noise Action[SOLVED]  (Read 3444 times)

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
Perlin Noise Action[SOLVED]
« on: January 15, 2014, 11:43:18 PM »
Hi im using perlin noise action to give random movement to my objects also using add force 2D, the problem is that perlin noise only give positive value  0-1, they add random movement but they always look to be moving in the positive side of screen, could you tweak perlin noise action to  -1 0 1 something like that,
i could multiply it for negative value, but then the force only will be in negative side.
« Last Edit: January 17, 2014, 01:30:00 AM by jgalvezpa »

dasbin

  • Junior Playmaker
  • **
  • Posts: 92
Re: Perlin Noise Action
« Reply #1 on: January 16, 2014, 04:38:25 PM »
Why not just:

x = random (0..1)
x = x - 0.5
x = x * 2

Groo Gadgets

  • Beta Group
  • Full Member
  • *
  • Posts: 175
Re: Perlin Noise Action
« Reply #2 on: January 16, 2014, 05:03:46 PM »
Heya,

I think the easiest way would be to use Jean's awesome float remap action:

http://hutonggames.com/playmakerforum/index.php?topic=5122.msg24311#msg24311

Simply map your 0 - 1 range to -1 - 1   :)

Cheers,

Simon

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Perlin Noise Action[SOLVED]
« Reply #3 on: January 24, 2014, 08:07:39 AM »
Hi,

 yes, this float remap should have been better worded, the right mathematical term is cross multiplication:

http://en.wikipedia.org/wiki/Cross-multiplication

bye,

 Jean