playMaker

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

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
Perlin Noise Action[SOLVED]
« on: January 15, 2014, 09: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 16, 2014, 11:30:00 PM by jgalvezpa »

dasbin

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

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

Groo Gadgets

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Perlin Noise Action
« Reply #2 on: January 16, 2014, 03: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: 14458
  • Official Playmaker Support
    • View Profile
Re: Perlin Noise Action[SOLVED]
« Reply #3 on: January 24, 2014, 06: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