playMaker

Author Topic: random position, rotation  (Read 1168 times)

nabilfx

  • Full Member
  • ***
  • Posts: 186
random position, rotation
« on: June 20, 2019, 11:26:49 AM »
how can i do a Random position, and random rotation of an object, slow moving?
in a loop
« Last Edit: June 20, 2019, 11:28:34 AM by nabilfx »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: random position, rotation
« Reply #1 on: June 20, 2019, 05:12:31 PM »
Hi.
You can use random float for each direction (x,y,z)

if you want it from a list of preset vector 3's
Then you can use 'Select Random Vector3' or you an array and random array.

Same for position and rotation.

nabilfx

  • Full Member
  • ***
  • Posts: 186
Re: random position, rotation
« Reply #2 on: June 20, 2019, 05:38:13 PM »
here example

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: random position, rotation
« Reply #3 on: June 20, 2019, 06:07:06 PM »
Hi.
Random same as on my 1st post, but set them as new position.

Then use 'Vector 3 Interpolate' the 1st vector is old position,
Then 2nd vector new position.

When finished,
use 'set vector 3'  set 'new position' to 'old position'

loop back to get new random.

Same for rotation on a separate fsm

You can even randomize time to do the interpolate.

nabilfx

  • Full Member
  • ***
  • Posts: 186
Re: random position, rotation
« Reply #4 on: June 21, 2019, 01:11:54 AM »
I have 8 object, i need all of them in diferent random position and rotation loop, very slow and very short movement. Can u help me do that eith fsm.