Itoo Software Forum

Author Topic: Random Transform, Random less then 1.0 value.  (Read 235 times)

allemyr

  • Newbie
  • *
  • Posts: 14
Random Transform, Random less then 1.0 value.
« on: March 23, 2020, 07:29:11 PM »
Hi Itoo.

I would like to ask if its powwible to random transform objects inside a Forest Pack object less then 1.0 value, like random rotate between -0.5 to 0.5 for example.
I can only write hole integeres but need something around 0.2 to 0.2 in rotation.

Thx in advance!

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2520
    • iToo
Re: Random Transform, Random less then 1.0 value.
« Reply #1 on: March 23, 2020, 09:56:18 PM »
You can use custom Effect.
This will ranzomize Z axis from -0.5 to 0.5 degrees:

fpItem.rotation.z = degtorad(randomReal(-0.5,0.5));
Rokas
iToo Software

allemyr

  • Newbie
  • *
  • Posts: 14
Re: Random Transform, Random less then 1.0 value.
« Reply #2 on: March 25, 2020, 04:46:15 PM »
Hi, Thank you very much works great!

What would the same be for translation in small amounts don't what to write instead of degtorad, value?

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2520
    • iToo
Re: Random Transform, Random less then 1.0 value.
« Reply #3 on: March 25, 2020, 05:00:43 PM »
You can use already existing effects for that:
Rokas
iToo Software

allemyr

  • Newbie
  • *
  • Posts: 14
Re: Random Transform, Random less then 1.0 value.
« Reply #4 on: April 23, 2020, 02:11:27 PM »
Hi, I would like to randomly translate items say 0.5 values in the Z direction how do I do that?

I'am working on a brickwall with Forest Pack right now, placing bricks in spline vertex positions.

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2520
    • iToo
Re: Random Transform, Random less then 1.0 value.
« Reply #5 on: April 23, 2020, 03:14:55 PM »
Hi

You can use "Translate in world units: effect and specify exact units in cm:



Hope this helps.
Rokas
iToo Software